We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi All,
I have an issue I could use some help with. I need to create a running total measure instead of the below.
Where that has +'s and -'s for each month, this data isn't really totaled up so that it makes sense looking in the future.
Where I have this:
Current Month:
Current Inventory: 10
Ins: 5
Outs: 6
Final Inventory : 9
Next Month:
Current Inventory: 0
Ins: 0
Outs: 7
Final Inventory : -7
I'd like this:
Current Month:
Current Inventory: 10
Ins: 5
Outs: 6
Final Inventory : 9
Next Month:
Current Inventory: 9
Ins: 0
Outs: 7
Final Inventory : 2
Thanks!
Solved! Go to Solution.
Try Like this . Adding Inventory from day one. I have used the same table. Use appropriate tables
Inventory till date =
Var _min_date_for_inventory = CALCULATE(maxx(all('Date'[Date Filer]),'Date'[Date Filer]))
Var _Todays_date=CALCULATE(maxx(ALLSELECTED('Date'[Date Filer]),'Date'[Date Filer]))
Var _inventory= CALCULATE(sum(Sales[Sales Amount]),Sales[Sales Date]<=_min_date_for_inventory)
Var Sale_till_tody =CALCULATE(sum(Sales[Sales Amount]),filter(sales,Sales[Sales Date]<=maxx(Sales,Sales[Sales Date].[Date])))
Var purchase_till_tody =CALCULATE(sum(Sales[Sales Amount]),filter(sales,Sales[Sales Date]<=maxx(Sales,Sales[Sales Date].[Date])))
return
_inventory+Sale_till_tody-purchase_till_tody
Try Like this . Adding Inventory from day one. I have used the same table. Use appropriate tables
Inventory till date =
Var _min_date_for_inventory = CALCULATE(maxx(all('Date'[Date Filer]),'Date'[Date Filer]))
Var _Todays_date=CALCULATE(maxx(ALLSELECTED('Date'[Date Filer]),'Date'[Date Filer]))
Var _inventory= CALCULATE(sum(Sales[Sales Amount]),Sales[Sales Date]<=_min_date_for_inventory)
Var Sale_till_tody =CALCULATE(sum(Sales[Sales Amount]),filter(sales,Sales[Sales Date]<=maxx(Sales,Sales[Sales Date].[Date])))
Var purchase_till_tody =CALCULATE(sum(Sales[Sales Amount]),filter(sales,Sales[Sales Date]<=maxx(Sales,Sales[Sales Date].[Date])))
return
_inventory+Sale_till_tody-purchase_till_tody
Hi,
Share the link from where i can download your PBI file.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 38 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 67 | |
| 62 | |
| 38 | |
| 34 | |
| 22 |