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 Bi users,
What woudl be the best way to buld a card visual that would read out the percentage of the date slicer.
The challenge would be that scrolling from either end reads the percentage: If you mover the left slicer dot to the right a quarter of the way, you get 75% reading and if you move the right slicer dot, a quarter to the right ,you get a 50% reading for the whole date range.
Thank you people.
Solved! Go to Solution.
hi @matrix_user
you can try
Selected Date Range % =
VAR FirstDateEver =
CALCULATE ( MIN ( Sales[Order Date] ), REMOVEFILTERS () )
VAR LastDateEver =
CALCULATE ( MAX ( Sales[Order Date] ), REMOVEFILTERS () )
VAR FirstDateInFiltet =
MIN ( Sales[Order Date] )
VAR LastDateInFiltet =
MAX ( Sales[Order Date] )
RETURN
DIVIDE (
DATEDIFF ( FirstDateInFiltet, LastDateInFiltet, DAY ),
DATEDIFF ( FirstDateEver, LastDateEver, DAY ),
0
)
But you have to know that if you have dates without sale then the calculated percentage might not be accurate for some selections. Best is to have a date table.
Thanks Tamerj1
hi @matrix_user
you can try
Selected Date Range % =
VAR FirstDateEver =
CALCULATE ( MIN ( Sales[Order Date] ), REMOVEFILTERS () )
VAR LastDateEver =
CALCULATE ( MAX ( Sales[Order Date] ), REMOVEFILTERS () )
VAR FirstDateInFiltet =
MIN ( Sales[Order Date] )
VAR LastDateInFiltet =
MAX ( Sales[Order Date] )
RETURN
DIVIDE (
DATEDIFF ( FirstDateInFiltet, LastDateInFiltet, DAY ),
DATEDIFF ( FirstDateEver, LastDateEver, DAY ),
0
)
But you have to know that if you have dates without sale then the calculated percentage might not be accurate for some selections. Best is to have a date table.
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 |
---|---|
43 | |
26 | |
20 | |
14 | |
8 |
User | Count |
---|---|
75 | |
47 | |
45 | |
17 | |
16 |