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.
Hello,
I calculated a measure and I'd like to display it on clustered column chart, however instead of putting each year-month or each date, I'd like my axis to be
-current selection (so 06.2022)
-end of year last year (12.2021)
-end of year -2 years (12.2020)
and If I choose period of 2021 like february 2021 then
-current selection (so 02.2021)
-end of year last year (12.2020)
-end of year -2 years (12.2019)
is it possible to achieve?
@Pbiuserr use the logic in this video, but instead using it in a slicer just put it on the X axis.
https://www.youtube.com/watch?v=fKygF7VEJnQ
Hello
I actually managed to get an axis and measure for that
measure is
Last3YearCurrentCurrentMonth =
VAR CurrentSelection =
VALUES('Calendar'[YEAR-MONTH])
VAR DataTab =
CALCULATETABLE(
SUMMARIZE('Calendar CurrentLastMonth',
'Calendar CurrentLastMonth'[Year],
'Calendar CurrentLastMonth'[Month]
),
'Calendar CurrentLastMonth'[YEAR-MONTH] = CurrentSelection
)
VAR Relation =
TREATAS(
DataTab,'Calendar'[Year],'Calendar'[MONTH NAME])
VAR Product =
CALCULATE(
[MyMeasure %],
Relation,
REMOVEFILTERS('Calendar')
)
RETURN
Product
)
and [MyMeasure %] is DIVIDE ( [COUNT_YTD], [AverageCount2],0 )
REMOVEFILTERS() makes AverageCount2 bigger amount as it removes date filter context, but I'd like to keep it (its like 30k through dataset, but only 3k for June 2022), however if I removefilter from measure, my bars from chart (LY EndOfYear, Year-2 EndOfYear) disappears due to context
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
51 | |
48 | |
48 |