Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Having issue while removing the impact of the version filter into the dax.
If the row of version doesnt exist in any profit center filter then version should not filter the rows of profit center if any version is selected.
DAX is as below
MTD Actual Balance 2 =
var max_period_num = CALCULATE(MAX('MF4-MFG-PBQ'[PERIOD_NUM]))
var max_fiscal_year = MAX('MF4-MFG-PBQ'[FISCAL_YEAR])
var result = CALCULATE(SUM('MF4-MFG-PBQ'[Balance]), 'MF4-MFG-PBQ'[Version.Version Level 01.Key]="1", 'MF4-MFG-PBQ'[FISCAL_YEAR]=max_fiscal_year, 'MF4-MFG-PBQ'[PERIOD_NUM]=max_period_num, ALL('MF4-MFG-PBQ'[Version.Version Level 01.Key]) )
RETURN result
Hi @PwC_BAN ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PwC_BAN ,
You can use the following dax:
MTD Actual Balance 2 =
var max_period_num = CALCULATE(MAX('MF4-MFG-PBQ'[PERIOD_NUM]))
var max_fiscal_year = MAX('MF4-MFG-PBQ'[FISCAL_YEAR])
var result =
CALCULATE(SUM('MF4-MFG-PBQ'[Balance]),
FILTER(ALL('MF4-MFG-PBQ'),
'MF4-MFG-PBQ'[Version.Version Level 01.Key]="1"&&
'MF4-MFG-PBQ'[FISCAL_YEAR]=max_fiscal_year&&'MF4-MFG-PBQ'[PERIOD_NUM]=max_period_num
))
RETURN result
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yangliu-msft all function is showing all other's profit centers data which are not even selected and when we use allselected it also filters the same data as previous.