# Creating a counter for a certain dimension based on the value of another dimension value

Hi,

I’m rather new to EazyBI but learning fast

I’m using EaziBI as a visualisation tool for data coming from a huge Excel file; Purpose is to provide my stakeholders with eazy digestable dashboards in confluence.

in my table, I have a list of customers, some are flagged as “compliant” and others as “not compliant”
The customer name as well as the compliance flag are two dimensions. the flag is no a boolean but a string where value could “Compliant”/“Not Compliant”.

In Excel, I would do a simple pivot where my rows would be the compliance dimension and then have a value which would count the number of customers of each compliance value. This i would show as a percentage of grand total.

I guess that to do that in EazyBI I need to create a measure but I must say i’m really struggling with getting the MDX working. Can someone tell me how to do that?

Thanks and regards,

Xavier

Hi @xheyvaer ,

You can use the Count() function to count the Customer dimension members for each Compliant dimension value. See the suggested formula below:

``````NonZero(Count(
Filter(
Descendants([Custumer].CurrentMember,[Custumer].[Customer]),
[Measures].[Some measure]>0
)
))
``````

The Filter() function will return a set of Customer dimension members with a value in “Some measure”. The “Some measure” should be a numeric measure that you imported with the Excel file. It is necessary to tie both dimensions together and retrieve relevant values.

For more details on the functions used in the formula, visit the eazyBI documentation page - MDX Function reference - eazyBI for Jira.

Best,
Roberts // support@eazybi.com