Forum Discussion
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!
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.
1 Reply
- Ashish_MathurSuper 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.