Forum Discussion

SM321's avatar
SM321
Frequent Visitor
2 years ago

Storing values in Power BI

Hello Power BI geeks,

 

I am developing a scorecard and the values for Current Month are calculated measures – The current month’s value would be Last Month’s value in the upcoming month meaning let’s say if the Current month value as of April 16th is 250, on May 16th Last Month's value would be 250. Is there a way we could have the value stored within Power BI because my source doesn’t have transactional data based on dates and I’d want to show the trend MoM in the scorecard. (The arrows are based on the value between Months, if it has gone up from the value of last month, then an upwards arrow else downwards)

Product

Last Month

Current Month

Target

Hersheys

230

250

750

KitKat

50

330

300

Lindt

790

620

2500

Snickers

560

800

1000

M&Ms

210

110

800

 

 

2 Replies

  • mahenkj2's avatar
    mahenkj2
    Solution Sage

    Hi SM321 

    You say 


    SM321 wrote:

    Is there a way we could have the value stored within Power BI because my source doesn’t have transactional data based on dates"

     


    So how does your sample data look like? You did show desired output, but please share input data in usable format (not a screenshot), remove any sensitive info please.

     

    If dates are present in your source, then you can create two measures, one is showing current month sales and another for previous month with the already available source data. Measure works dynamically based on criteria you set, current month and current month -1.

     

    Hope it helps you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mahenkj2 ,thanks for the quick reply, I'll add further.

    Hi SM321 ,

    Regarding your question, unfortunately Power BI is not a tool for storing data, it is meant for data analysis .If you want to store the results of your metrics into a specific table, perhaps you can refer to the following article for a solution.

    Store them somewhere (Azure SQL DB, Datalake, Sharepoint... whatever).Append to the records the date of the snapshot so you can idenity snapshot date.

    Solved: Save Measures or Calculated Column Values in a sep... - Microsoft Fabric Community

     

    Best Regards,
    Wenbin Zhou
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.