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 September 15. Request your voucher.
Hi Team,
I need to calculated column for last 3 months from selected month.
for example, if we select "May", then result should is May, April, March.
Thanks in advance.
Hi @siva54
Do you want a table with one column that has three months from the selected month? If yes, you can use DATESINPERIOD and use SELECTEDVALUE as a start date.
But suppose you want a calculated column in your existed table to show last 3 months from the selected month. In that case, you can use the above code and filter to use that in a calculation or add a calculated column and say if a date is in the range, show one; otherwise, zero.
Read this link and add more details to your request:
Appreciate your Kudos✌️!!
Since there is no any filter context in the Calculated Column you will not be able to achive it based on a filter selection. As per above solution you can do it based on Todays value only.
Hi Kazun909,
For More clarification,
If i select May then in the table i need to see last three months data(only March, April, May).
we have year also.
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
12 | |
9 | |
7 |