Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |