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.
Hi Power Community,
I have a date filed in Fact table wihich continas data since 2005 till yesterday.
For filtering purpose I am using Date dimention which contians 2005 till 2025. here when ever user open report user should see data in current year till yersterday.
The Slicer also shoud show only the curreent year(till yesterday not entire year 01/01/2020 - 05/11/2020) as default selection.
PLease sugget me solution its a showstiopper for me since a two days.
Thanks.
Solved! Go to Solution.
Hi, @Anonymous
According to your description, you want the data, and Slicer both show only the current year till yesterday. If you just want to show data from the current year till yesterday, you can try this measure:
Measure =
CALCULATE(MAX([Amount]),FILTER('Table',YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()-1))
And place the measure to the chart, like this:
If you want to set default value for a Slicer, I think that you can try the Power Slicer . It’s a custom visual which supports adding default value to Slicer using JavaScript. You can download it and try to figure out how to realize it.
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, you want the data, and Slicer both show only the current year till yesterday. If you just want to show data from the current year till yesterday, you can try this measure:
Measure =
CALCULATE(MAX([Amount]),FILTER('Table',YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()-1))
And place the measure to the chart, like this:
If you want to set default value for a Slicer, I think that you can try the Power Slicer . It’s a custom visual which supports adding default value to Slicer using JavaScript. You can download it and try to figure out how to realize it.
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , There is workaround .
Create a column like this and sort it on date and save it on yesterday
New column in date table
Date Type = SWITCH(TRUE(),'Date'[Date]=TODAY(),"Today",'Date'[Date]=TODAY()-1,"Yesterday",'Date'[Date]&"")
It has all dates with yesterday and today and sorted on the date to will behave the same. You can use format on date, if needed
Refer my video for steps: https://www.youtube.com/watch?v=hfn05preQYA
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |