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
tmears
Helper III
Helper III

Compare values

I wonder if any of you amazing people out there could help me.   drawing a bit of a blank.

 

What I want to do is to compare 2 values to see how we are performing at periods through the month.

 

1) Compare todays value with the same day last week

2)Compare the same number of days in the current week to the same period last week, so today would be mon-wed compared to mon-wed the previous week

3)compare the same number of days in the current month to the same number of days the previous month, so we are in day 24 compare 24 days  from last month

 

The current dax statement to get any days data is

 

VerifiedDay = CALCULATE(COUNT(FactSalesHistory[SalesHistoryId]),FILTER(DimSalesAction,DimSalesAction[FlagSuccess]=TRUE()),FILTER(DimDate,DimDate[DateId]=SELECTEDVALUE(DateSelector[DateId],MAX(DateSelector[DateId]))))+0

 

The fact tables are filtered on dateid from the dimdate table which in turn is filtered by the date in the dateselector table which is used in a slicer

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @tmears 

If you could refer to this blog:

Filtering and comparing different time periods with Power BI

 

If you still have problem, please share Sample data and expected output.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Lin

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

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.