Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I've checked similar topic, but couldn't do the same for my case. Please help.
Solved! Go to Solution.
@YeldarR , Try like
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
SUMX(FILTER(BS_actuals,[date_key]=maxDate),[value])
or
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
SUMX(values(BS_actuals[Level1]), calculate( MAXX(FILTER(BS_actuals,[date_key]=maxDate),[value]) ) )
@YeldarR , Try like
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
MAXX(FILTER(BS_actuals,[date_key]=maxDate),[value])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thank you. Nope doesn't work. It works only for level1 layout, but level2 layout show maxx instead of sum.
BS actuals goes the following:
BS layout:
@YeldarR , Try like
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
SUMX(FILTER(BS_actuals,[date_key]=maxDate),[value])
or
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
SUMX(values(BS_actuals[Level1]), calculate( MAXX(FILTER(BS_actuals,[date_key]=maxDate),[value]) ) )
Thank you!
First one is correct.
Everyone who complies balance sheet, must use this command to get balances correct:
Return actual balance =
VAR maxDate = MAXX(allselected('BS_actuals') , 'BS_actuals'[date_key])
RETURN
SUMX(FILTER(BS_actuals,[date_key]=maxDate),[value])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.