Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All
I have below expression working fine :-
Solved! Go to Solution.
Hi @admin11
You can create a table, column Month in the table is related to specific number, then switch the specific number according to column Month.
Create the column:
Show Last 24 Month =
VAR _month =
MONTH ( TODAY () )
VAR _num =
CALCULATE (
SELECTEDVALUE ( 'Table'[Value] ),
FILTER ( 'Table', MONTH ( 'Table'[Month] ) = _month )
)
RETURN
IF ( 'Date'[Date] >= EDATE ( TODAY (), _num ), 1, 0 )
result:
See sample file attached bellow.
By the way, I don’t understand why you named the DAX column as Show Last 24 Month since you want the data of the past 25,26,27… months, is there anything wrong?
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |