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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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, 

 

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your sample picture of your Matrix, it seems like you have only placed one measure into the “Value” field of your Matrix. It will also show blank if the measure doesn’t have any value in the Matrix or the two tables have no relationship.

Would you like to post some sample data or your test pbix file(without sensitive data) and your expected result so that we can help you in advance?

Thank you very much!

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

If I understand correctly, you want the below image to show the result of above image? Can you use YYYY-MM format in the column? Then combin your two measures into one

 

new Measure = 
VAR CurYear =YEAR( SELECTEDVALUE(YOUR YYYY-MM Column))
RETURN
IF(CurYear = 2020,[Nbp],[Nbpre])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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