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
HGS_Stephan
Frequent Visitor

Matrix: Measures in rows with time intelligence?

Hello,

 

i have different measures to calculate different values, e.g. sales, margin etc. I am using a date slicer, for filtering the current year and i display the measures as rows in a Matrix and now i want as columns Last Year, Current Year and Budget.

 

Current Year and Budget are no problem, but i cant display the values for last year - and i dont know how to construct the measure for it..

Is it even possible to to this?

 

                             Last Year | Current Year | Budget

_____________________________________________________

Sales Measure    |              |                        |

Margin Measure|               |                        |

 

 

Kind regards

Stephan

2 REPLIES 2
amitchandak
Super User
Super User

@HGS_Stephan , Create a date table and join that with your sale, Target and other tables

Then using time intelligence you can have measure like. (change the measures as per need)

 

 

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Hi @amitchandak 

 

thanks for your suggestion, but this works only if i am using using the measures as coloumns. But i want to use them as rows. If i use yours i get this:

HGS_Stephan_2-1658213772232.png

My question was if it is possible to get all 4 values with one measure in one row?

 

Kind regards

Stephan

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.