Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Need help with DAX | converting column formula in DAX measure

Hi Community, 

 

Can you please help me with writng following column formula into  DAX measure which can filtered by Years.  

 

Column -> Total Products in ALL Years= CALCULATE( COUNT ('Table'[ID ] ) , ALLEXCEPT( 'Table' ,'Table'[ID ] )) 

 

Link to File  - > https://1drv.ms/u/s!Agarkj-fHbLWjgkn-5Cm64lDbHgU

 

Many Thanks 

C. 

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

//filter by Id and year

CALCULATE( COUNT ('Table'[ID ] ) , ALLEXCEPT( 'Table' ,'Table'[ID], 'Table'[Year] )) 

 

filter only by year

CALCULATE( COUNT ('Table'[ID ] ) , ALLEXCEPT( 'Table' ,'Table'[Year] )) 

 

Filter with all filter // value is at ID level

 

CALCULATE( COUNT ('Table'[ID ] ) , filter( allselected('Table') ,'Table'[ID] =max('Table'[ID])  )) 

Anonymous
Not applicable

Hi @amitchandak ,  thankyou so much for your help.  I have  to create  categories based on how many  products consumed by ID in seletected period.   How can I achieve with above mentioned measure.  ( the above measure will not be able to apply on axis in visualization pane) . 

 

I tried with column but the problem it it not dymanic. ( i.e.  I have either apply filteration of  years to see how many have multi or single products users or go without using year filter) .  Please suggest best way for it. 

 

I have to create following visual where on axis it shows how many product users are in the data.  Also , If I apply year filters  I can see how many use one or more than  one products in that period. 

 

Again, thankyou so much for your help . 

 

 

Channa_0-1644941804021.png

 

Hi, @Anonymous 

Sorry, currently you cannot use the year filter to filter the value of calculated column.

It is recommended to consider calculating the results for these three years separately.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors