Forum Discussion
Automate table to add months
- 4 years ago
Hi Anonymous ,
Suppose your data is till August,such as below:
First create a calendar table to the end of the year,then create a relationship between the 2 tables;
Finally create a measure as below:
Measure = IF ( MONTH ( MAX ( 'Table 2'[Date] ) ) <= MONTH ( TODAY () ), 1, BLANK () )Put the measure in the filter pane and select measure is 1:
And you will see:
For each new adding month,you could use another measure to fill in the data.
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my raeply as a solution!
Interesting question. I am afraid, it is not possible in Power BI- if the intention is to insert rows in the database. We can create a Measure that probably can do what you want in a matrix (a visual).
- Anonymous4 years agoNot applicable
Hi Rammishra -
My other thought is that I could add months in my table out for a couple years with the current values (70, 90, 100), and I would manually edit the rates if we have a rate change. But I'm not sure in the visual, how I would be able to show through the current month? So for example, when October 1st, 2021 rolls around, I would want my visual to show all the rates for the previous months THROUGH October (but nothing beyond). I know I can manually add October in the filters, but how would I automate it so that PowerBI knows to only show the rates through the current month?
Thank you!
- v-kelly-msft4 years agoCommunity Support
Hi Anonymous ,
Suppose your data is till August,such as below:
First create a calendar table to the end of the year,then create a relationship between the 2 tables;
Finally create a measure as below:
Measure = IF ( MONTH ( MAX ( 'Table 2'[Date] ) ) <= MONTH ( TODAY () ), 1, BLANK () )Put the measure in the filter pane and select measure is 1:
And you will see:
For each new adding month,you could use another measure to fill in the data.
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my raeply as a solution!
- Anonymous4 years agoNot applicable
Thank you, Kelly!