March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I have a PowerBI dashboard where I only want to see data from the prior business date. Is there a formula I can write for this?
Solved! Go to Solution.
Hi, @KhrystinaM
Based on your information, I create a table:
Please following these steps:
PreviousData =
VAR a = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Date]=EARLIER('Table'[Date])-1))
RETURN
IF(WEEKDAY('Table'[Date])=1||WEEKDAY('Table'[Date])-1=7||WEEKDAY('Table'[Date])-1=1,BLANK(),a)
For example, if I select the date as Monday, he will not display the data for Sunday.
If I select a date on Saturday, it will show the value of the previous day, which is Friday.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KhrystinaM
Create a new column in the home page instead of Custom Column in Power Query.
Powe Query uses M and mine is a DAX expression, so it gets an error in Power Query.
Try selecting New column under Modeling and using DAX again.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KhrystinaM
Based on your information, I create a table:
Please following these steps:
PreviousData =
VAR a = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Date]=EARLIER('Table'[Date])-1))
RETURN
IF(WEEKDAY('Table'[Date])=1||WEEKDAY('Table'[Date])-1=7||WEEKDAY('Table'[Date])-1=1,BLANK(),a)
For example, if I select the date as Monday, he will not display the data for Sunday.
If I select a date on Saturday, it will show the value of the previous day, which is Friday.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KhrystinaM
Create a new column in the home page instead of Custom Column in Power Query.
Powe Query uses M and mine is a DAX expression, so it gets an error in Power Query.
Try selecting New column under Modeling and using DAX again.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That worked, thank you!!
Hi @KhrystinaM
Your message header and body little confusing
You are taking about Slicer data or filter data in Other visual
Can you share details, expected result and screenshot
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
77 | |
59 | |
56 | |
42 |
User | Count |
---|---|
184 | |
107 | |
82 | |
60 | |
48 |