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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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])  )) 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.