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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need DAX help!

Hi, 

 

I need help with writing some DAX to calculate values in a column within date periods.

 

For example, I would need to know the total of B, D and M's Group 1 is getting in all scores in Feb-18, Sep-19 ect? and it would be for all groups.

 

Any help is much appreciated! 

 

imo187_0-1654385579068.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on the first 2 columns and select "Unpivot Other columns".  Create a Calendar Table and write calculated column formulas for extracting Year, Month name and Month number.  Sort the Month name by the month number.  Create a relationships (Many to One and Single) between the Date column in your table to the Date column in the Calendar Table.  To your visual/slicer/filter, drag any date dimension from the Calendar Table.  Drag Value and school columns to your table/matrix visual and write this measure

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on the first 2 columns and select "Unpivot Other columns".  Create a Calendar Table and write calculated column formulas for extracting Year, Month name and Month number.  Sort the Month name by the month number.  Create a relationships (Many to One and Single) between the Date column in your table to the Date column in the Calendar Table.  To your visual/slicer/filter, drag any date dimension from the Calendar Table.  Drag Value and school columns to your table/matrix visual and write this measure

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors