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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

show value for one month for different year power bi dax

Hello, 

 

I'm working on a dax and I would regroup two measures in one to use it on a matrix table in order to display them in the following format : 

Capture14.PNG

 

The measures that I'm using are : 

 

Nbp = CALCULATE(SUM('Forecast'[Nje]))
Nbpre = CALCULATE(SUM('Time_records'[Nb Hours])/8))


So the purpose of regrouping these to measures is to show the results, for example, in January 2020 the Nbp measure will appear and in January 2021 Nbpre will appear as I show in the figure above. 
I tried to show it on the matrix table but I can't find the results! 

 

Capture13.PNG

Do you have any ideas? Any tips? 

Thank you in advance

Regards, 

 

1 REPLY 1
lbendlin
Super User
Super User

You are overcomplicating things.

 

- merge your measures into one measure that calculates differently based on the year.

- add a sort column to your dates table that allows you to sort the yearmonth column according to your display needs  and then wire it in via "sort by other column"

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors