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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Can i use a measure to get the previous dates results?

I am trying to display the percentage change between todays data and yesterdays, i have tried to create a measure that will provide the prevous days data, the measure is also filtering for values less than 30:

 

Previous_Day = CALCULATE(COUNT('Visit_Rate_History'[LC/O]), FILTER('Visit_Rate_History', 'Visit_Rate_History'[Days Since Last_x002] > 30) = TODAY() - 1)
 
I am unsure why this doesnt work, any tips?
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Like this?

vmengzhumsft_0-1669187267284.png

vmengzhumsft_1-1669187375571.png

Just create a calculated column and subtract yesterday's value from today's value. Please refer to my pbix file.

 

Best regards,

Community Support Team Selina zhu

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

7 REPLIES 7
amitchandak
Super User
Super User

@Anonymous , You can try measures like

 

Today = CALCULATE([Net], FILTER('Date','Date'[Date] = Today() ) )
Yesterday = CALCULATE([Net], FILTER('Date','Date'[Date] = Today()-1 ) )

 

 

https://medium.com/chandakamit/cheat-sheet-power-bi-time-intelligence-formulas-using-today-654f26e27304

 

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amitchandak, thank you for this!

 

I also need it to filter the results to only count values under 30? is that possible with that formula?

Anonymous
Not applicable

Hi @Anonymous ,

 

The above formula dynamically displays the current day and yesterday's values. If you need to filter the results, you can create a calculated column to calculate the percentages for both days, and then place the calculated column in the filter area for direct filtering.Like the following shows, I filter data under 50%:

vmengzhumsft_0-1669023235956.png

Related pbix file you can also refer.

 

Best regards,

Community Support Team Selina zhu

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

Anonymous
Not applicable

Hi,

 

Thank you for this!

 

I need to only show the percentage change, would i just need to create a measure that divided today by yesterday and then the Multiply by 100?

Anonymous
Not applicable

Hi @Anonymous ,

 

In power bi, there are more convenient options to help you transform the values directly into percentage form. As shown in the figure,in "column tools".

vmengzhumsft_0-1669024027455.png

Best regards,

Community Support Team Selina zhu

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

 

 

Anonymous
Not applicable

Hi,

 

Sorry for any confusion caused, i need to only show the difference between todays and yesterdays percentage, so for example:

 

Today: 40%

Yesterday: 37%

Percentage Change: +3%

 

I just need to display the percentage Change on a card.

Anonymous
Not applicable

Hi @Anonymous ,

 

Like this?

vmengzhumsft_0-1669187267284.png

vmengzhumsft_1-1669187375571.png

Just create a calculated column and subtract yesterday's value from today's value. Please refer to my pbix file.

 

Best regards,

Community Support Team Selina zhu

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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