Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
What I am trying to achieve is to only show the values for the months smaller and equal to the selected month (slicer) but still but still only months in my financial year. The measure works if I manually add the number (in this case no. 6 below).
But I would like write the measure to dynamically give the month number selected so I can be applied to the measure. Using the following measure I can calculate the number:
Any suggestions?
Kind regards,
Niel
Hi @Axiomite ,
Could you please share me with your pbix file after removing sensitive data?
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
Let me know if you are able to access the pbix.
Many thanks for your reply.
Best Regards,
Niel
Hi @Anonymous ,
Let me know if you are able to access the pbix.
Many thanks for your reply.
Best Regards,
Niel
@Axiomite Maybe:
N months number =
VAR _start = STARTOFYEAR( ALL(dimDates[Date])) -1
VAR _end = ENDOFMONTH( ALL(dimDates[Date]) )
RETURN
DATEDIFF( _start, _end, MONTH ) - 2
That said, I wouldn't recommend TI functions.
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |