Forum Discussion
veer
8 years agoFrequent Visitor
How to Assign Month Number Dynamically
Assign Month Number Dynamically Example = feb=1 mar=2 april=3 . . . dec=11 current month jan is =12 Last 12 month data show Moving AvG Prob cureent month is jan =12 ...
- 8 years ago
veer,
Please create calculated column in your table with formula below:
DynamicMonth = IF(MOD(MONTH(Table1[CreatedDate]) - MONTH(TODAY())+12,12)=0,12,MOD(MONTH(Table1[CreatedDate]) - MONTH(TODAY())+12,12))
Dynamic month in DAX
Where Table1 = your table name,
[CreatedDate] = your date field name.
Let me know if I understood you correct.
zoloturu
8 years agoMemorable Member
veer,
Please create calculated column in your table with formula below:
DynamicMonth = IF(MOD(MONTH(Table1[CreatedDate]) - MONTH(TODAY())+12,12)=0,12,MOD(MONTH(Table1[CreatedDate]) - MONTH(TODAY())+12,12))
Dynamic month in DAX
Where Table1 = your table name,
[CreatedDate] = your date field name.
Let me know if I understood you correct.