Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
I'm trying to combine data from two columns, in two different tables and then create a running total. My three tables are all joined by Month.
I want to create a running total of value 1 and value 2 that looks like the target. If value 2 is blank I want to take value 1, if value 2 is not blank I want to take value 2. Then I want to create a running total of those values.
I create a DAX formula to combine value 1 and 2. Taking value 1 if value 2 is blank, else taking value 2:
Value 1 or Value 2 = if(ISBLANK(sum('Value 2'[Value 2])), sum('Value 1'[Value 1]), sum ('Value 2'[Value 2]))
Then I create another DAX to create a running total:
Does anyone know how I can do this?
Many thanks.
Solved! Go to Solution.
Ok
I have created 2 tables :
T1
T2
And after these 2 measures
Can you have a value in 1 or 2 for the same period ?
Yes, so you can see in the example that 2024-03 has a value 1 and a value 2. Because value 2 is not blank, I want to select it and ignore value 1.
Ok
I have created 2 tables :
T1
T2
And after these 2 measures
That works! Thank you so much! I just wish I understood what you've done, but I can copy it for now and study it later!
No problems.
_step1 ==> Just summarize the table T1 and add a column "@valid" on wich I asked to see if there is some value for this period on T2. If countrows of T2 with this period is >0 then "No" else "Yes"
_Step2 ==> I sorted _step1 only with "Yes" values
_Step3==> Summarize of _step2 to delete the column @valid
and
return is the sum of the value of the UNION of _step3 and table T2
Hi
Why don't you use DATESYTD
calculate([Value 1 or Value 2],Datesytd(Dimdate[Date])
Thanks. I've done that, but it still gives the same result.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.