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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mehlenbae2
Helper II
Helper II

How to measure the decrease or increase by newest date

I am trying to measure the total increase or decrease of virus count by month by Configuration Item but I am unable to do this because the Virus Count is in one column and I have hundreds of thousands configuration items. I am hoping to put this in a line chart on PBI.. How can I do this easily? I am not that great with DAX.. Virus counts can increase and decrease anytime and I want to do see it all in one large line chart. Is this possible?

 

Here is my dataset:

mehlenbae2_0-1672841105347.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mehlenbae2 ,

 

Here I create a sample to have a test.

Tables:

RicoZhou_0-1672908134960.png

Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]))

Relationship:

RicoZhou_1-1672908172628.png

Measure:

Difference = 
VAR _CURRENT = CALCULATE(SUM('Table'[Virus Count]))
VAR _PREVIOUS = CALCULATE(SUM('Table'[Virus Count]),PREVIOUSMONTH('Calendar'[Date]))
RETURN
_CURRENT - _PREVIOUS

Result is as below.

RicoZhou_2-1672908200543.png

 

Best Regards,
Rico Zhou

 

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

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @mehlenbae2 ,

 

Here I create a sample to have a test.

Tables:

RicoZhou_0-1672908134960.png

Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]))

Relationship:

RicoZhou_1-1672908172628.png

Measure:

Difference = 
VAR _CURRENT = CALCULATE(SUM('Table'[Virus Count]))
VAR _PREVIOUS = CALCULATE(SUM('Table'[Virus Count]),PREVIOUSMONTH('Calendar'[Date]))
RETURN
_CURRENT - _PREVIOUS

Result is as below.

RicoZhou_2-1672908200543.png

 

Best Regards,
Rico Zhou

 

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

 

amitchandak
Super User
Super User

@mehlenbae2 , the expected output is not clear. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

I think these can help

 

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
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.