Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Currently I am able to create this for a card :
DateText = IF(AND(SELECTEDVALUE(PERIOD_DIM[MTH],"All") ="All", SELECTEDVALUE(PERIOD_DIM[YR],"All")="All"),(MIN(PERIOD_DIM[MTH]) & "/" & MIN(PERIOD_DIM[YR]) &" - " & MAX(PERIOD_DIM[MTH]) & "/" & MAX(PERIOD_DIM[YR])),(SELECTEDVALUE(PERIOD_DIM[MTH],"All") & "-" & SELECTEDVALUE(PERIOD_DIM[YR],"All")))
However, the max month in my table is Sep of this year. I need to limit it to the previous month. I also want the slicer that is a Hierarchy Slicer built on MTH and YR to default to the previous month and year. That would then populate in the card. Is that possible?
Solved! Go to Solution.
I solved it with this:
I solved it with this:
@snoh8r49 , you need a column like this in your date table
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1*month(Today())),"Last year Last Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
or
Month Type =
var _today = max(Fact[Date])
Switch( True(),
eomonth([Date],0) = eomonth(_today ,-1*month(_today )),"Last year Last Month" ,
eomonth([Date],0) = eomonth(_today ,-1),"Last Month" ,
eomonth([Date],0)= eomonth(_today ,0),"This Month" ,
Format([Date],"MMM-YYYY")
)
User | Count |
---|---|
82 | |
76 | |
70 | |
69 | |
54 |
User | Count |
---|---|
105 | |
100 | |
91 | |
79 | |
68 |