The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I want the graph to show 5 full years and then January - March for 2023. The incomplete April data is throwing the entire thing off. How can this be acheived?
Solved! Go to Solution.
@ShaelynFrench , Sorry, my bad. Try like
Measure =
var _today = maxx(allselected(Table), Table[Date])
var _max = if(eomonth(_today, 0) = _max , eomonth(_today, 0) ,eomonth(_today, -1) )
return
if(max(date[Date]) > _max, blank(), [M1])
@ShaelynFrench , Assuming you are using Measure M1, then try a new measure like
Measure =
var _max = maxx(allselected(Table), Table[Date])
var _max = if(eomonth(today(), 0) = _max , eomonth(today(), 0) ,eomonth(today(), -1) )
return
if(max(date[Date]) > _max, blank(), [M1])
Hi,
@amitchandak This returns error "Variable '_max' cannot be created because a table or variable with the same name already exists." I assume since there are two var _max
@ShaelynFrench , Sorry, my bad. Try like
Measure =
var _today = maxx(allselected(Table), Table[Date])
var _max = if(eomonth(_today, 0) = _max , eomonth(_today, 0) ,eomonth(_today, -1) )
return
if(max(date[Date]) > _max, blank(), [M1])
That works! Thanks!
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |