The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a table where i Have Total amount for current month and Total arrivals and Total Sales Target for Next 4 months. I calculate Closing stock using formula as Total amount + Total arrivals - Total Sales Target from where i get Closing Stock for Current Month. Now my query is I have Closing stock for current month which should be the Total amount for Next month. For example from the image Closing stock for sept is 226.74 that should be the Total Amount for Oct month and same should go on till December.
I have two files attach below one is the value which i am getting and second is the solution which is needed.
Measures are created for all columns shown below.
Any help would be appreciated.
Solved! Go to Solution.
Hi @hozefamk,
Please check the sample as below. Here I create the measures as below.
Total Amoun = CALCULATE(SUM(Table1[Total Amount]))
Total arrival = CALCULATE(SUM(Table1[Total arrivals]))
Total Sales Targe = CALCULATE(SUM(Table1[Total Sales Target]))
Measure = [Total Amoun]+[Total arrival]-[Total Sales Targe]
Measure 2 = var curre = MAX(Table1[Index]) return CALCULATE([Measure],FILTER(ALL(Table1),Table1[Index]<=curre))
For more details, please check the pbix as attached.
Regards,
Frank
Hi @hozefamk,
Please check the sample as below. Here I create the measures as below.
Total Amoun = CALCULATE(SUM(Table1[Total Amount]))
Total arrival = CALCULATE(SUM(Table1[Total arrivals]))
Total Sales Targe = CALCULATE(SUM(Table1[Total Sales Target]))
Measure = [Total Amoun]+[Total arrival]-[Total Sales Targe]
Measure 2 = var curre = MAX(Table1[Index]) return CALCULATE([Measure],FILTER(ALL(Table1),Table1[Index]<=curre))
For more details, please check the pbix as attached.
Regards,
Frank
Hi @hozefamk,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
79 | |
78 | |
44 | |
39 |
User | Count |
---|---|
150 | |
116 | |
68 | |
64 | |
58 |