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.
Dear all,
I would like to filter on my slice by month and that my visuals showing all months of the year until the one chosen. If it is february I would like to see on the graphics the months od January and February.
Thanks you,
Solved! Go to Solution.
Hi , @maserr
Here I take four months as an example.
pbxi attached
Try steps as below:
1.Create a calculate table as a slicer:
Slicer = DATATABLE("Value",STRING,{{"1January"},{"2February"},{"3March"},{"4April"}})
2.Create a visual control measure" show Control" as below and put the measure into visual filters:
Show Control =
Var YM =
SELECTEDVALUE(financials[Date])
Return
SWITCH(
SELECTEDVALUE(Slicer[Month]),
"1January Month",IF(
MONTH(YM)<=1,1,-1),
"2February",IF(
MONTH(YM)<=2,1,-1),
"3March",IF(
MONTH(YM)<=3,1,-1),
"4April",IF(
MONTH(YM)<=4,1,-1),
1
)
3.it will show as below:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try. Assuming you month is coming from the date dimension
measure =
var _max = maxx('Date','Date'[Date])
var _min = date(year(_max),month(_max)-1,1)
return
calculate([measure],filter(all('Date'), 'Date'[Date]>= _min && 'Date'[Date]<= _max))
Thanks for your quick response, but which are the next steps once i have created the measure? it does not work on my visual.
Thanks another time
Hi , @maserr
Here I take four months as an example.
pbxi attached
Try steps as below:
1.Create a calculate table as a slicer:
Slicer = DATATABLE("Value",STRING,{{"1January"},{"2February"},{"3March"},{"4April"}})
2.Create a visual control measure" show Control" as below and put the measure into visual filters:
Show Control =
Var YM =
SELECTEDVALUE(financials[Date])
Return
SWITCH(
SELECTEDVALUE(Slicer[Month]),
"1January Month",IF(
MONTH(YM)<=1,1,-1),
"2February",IF(
MONTH(YM)<=2,1,-1),
"3March",IF(
MONTH(YM)<=3,1,-1),
"4April",IF(
MONTH(YM)<=4,1,-1),
1
)
3.it will show as below:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |