The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello All,
Please find the above table:
Query : Base 1 is null/blank in any month then i need to sum the Base 2 values from that null month to till last month of month of that year and need to display the value in new column called Achievement.
Example 1 :- Jan-18 base 1 is null, so i need to add Base 2 values from Jan-18 to Jun-18 ( 100 +200+200+100+150+200= 950)
next Feb-18 base 1 value is null again i need to add Base 2 values from Feb-18 to Jun-18 ( 200+200+100+150+200= 850)
Next time i need to add Base 2 values from Mar-18 to Jun-18 ( 200+100+150+200= 650) on so on ..... till the last month.
Need help to create Dax for the above requirement.
Thanks,
Hari.
Solved! Go to Solution.
Hi,
Here is the measure i used
Achievement = if(ISBLANK([Base1]),CALCULATE([Base2],DATESBETWEEN('Date'[Date],MIN('Date'[Date]),CALCULATE(MAX('Date'[Date]),ALL('Date'[Year Month])))),BLANK())
Hope this helps.
Hello,
Please Find the below PBI File link for the same.
https://www.dropbox.com/s/dfxma4lcd76ucvs/PBI.pbix?dl=0
Thanks,
Hari.
Hi,
Here is the measure i used
Achievement = if(ISBLANK([Base1]),CALCULATE([Base2],DATESBETWEEN('Date'[Date],MIN('Date'[Date]),CALCULATE(MAX('Date'[Date]),ALL('Date'[Year Month])))),BLANK())
Hope this helps.
Hi Ashish Mathur,
Much appreciated .
Thanks for the query.
Regards,
Hari.
You are welcome.
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 June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
246 | |
119 | |
114 | |
87 | |
70 |