Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
We have slicer1 named 'Period' having values Daily / Two Days/Three Days/Weekly/Fortnighlty/Montly/Half Yearly/Yearly
also we have slicer2 named 'From date' with datetime data type having list of date values.
Requirement:
1. When we select daily from 'period' slicer and date(say '01/08/2018') from slicer2, Our respective line graph should display data for '01/08/2018' only.
2. When we select Two days from 'period' slicer and date(say '01/08/2018') from slicer2, Our respective line graph should display data for '01/08/2018 and 02/08/2018' only.
3.When we select weekly from 'period' slicer and date(say '01/08/2018') from slicer2, Our respective line graph should display data for '01/08/2018 to 07/08/2018' only.
4.When we select Yearly from 'period' slicer and date(say '01/08/2018') from slicer2, Our respective line graph should display data for '01/08/2018 to 31/07/2019' only.
.......likewise
How can we achieve this in Power BI desktop
Your line values need to come from a measure that you construct based on the slicer selection (which you have hopefully set to single select, otherwise your users will try to select both "daily" and "monthly" and then complain to you that the result makes no sense)
The measure will look like so:
line value = switch(selectedvalue(slicer),"Daily",(day measure),"Weekly",(week measure),"Monthly",(month measure),...,Blank())
Thanks....@lbendlin
Can you also help with particular measure either for any of the period week ,day ..else to clculat range starting from selected date in slicer
User | Count |
---|---|
18 | |
11 | |
5 | |
4 | |
3 |