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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

KPI Card just shows last yoy but I need to show total of yoy for that period with the kpi card

Hi everyone,

 

I have to show how Sales changes over the year, but the same month last year and compare. So lets say last month dec18 was 21, then this should be compared with the value for dec19. Therefore, I used MTD. If somebody just can confirm if this is right?

Another question is that the KPI Card has to show the total yoy change for that specific period, so depends on where I put the date slicer in. If date slicer is on 4/18-3/19, then the KPI card should display the total of yoy change for 4/18-3/19. Even if i put it in the matrix, the grand total just shows me the value of last month but doesnt count the total of yoy change. I know that KPI card just display current value , but how can the measure look like so I can see the total of yoy change with the KPI Card. I have no idea how to create that measure. I just simulated the problem in the file but for some reason I cant attach the file. So I attached the file here :

https://github.com/datanewbi/pbi.git

 

Any help is more than appreciated.

 

Many thanks !

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous 

 

check this out.

 

PBIX

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous 

 

check this out.

 

PBIX

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Hi @mwegener ,

 

thank you soo much for your answer and for your help!!!! I really appreciate it!! I just have a question, in order to understand your measure.   Can you explain this one ? What does this one exactly do? Having Sameperiodlastyear and dateadd in one measure. 

 

Sales PY = CALCULATE(SUM('Table'[Sales ]), FILTER(SAMEPERIODLASTYEAR(ALLSELECTED('Date'[Date])), DATEADD('Date'[Date],1,YEAR) <= MAX('Date'[Date])))

 

Does this just compare Sales this year with Sales last year but only until the max of this month of Sales. For example just calculating Jan18 until 9/12/18 with Jan19 until 9/12/19?

 

Thank you so much again!!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.