Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
HI!
i need calculate
column CommonSum on table Test_main in power bi desctop in 4 variants:
on setting flag 'Manager'
on setting flag 'Client'
on setting both flag
and without their
the table Test_main has relation with tables M<anagers> and C<lients>, contain only one column
i write the next code
SumTotal = if(AND(ISFILTERED('C'[CNaims]);ISFILTERED('M'[MNames])); /*commonfilter */ calculate( SUM ('Test_main'[CommonSum] ); ALLEXCEPT( 'test_main';'Test_main'[Client];'Test_main'[Manager]); 'Test_main'[CommonSum] >= EARLIER ( 'Test_main'[CommonSum] )); /* FilterManager */ if(ISFILTERED('Clients'[CNaims]); CALCULATE ( SUM ('Test_main'[CommonSum] ); ALLEXCEPT('test_main'; Test_main[Manager] ); 'Test_main'[CommonSum] >= EARLIER ( 'Test_main'[CommonSum])); /* filterClients */ if(ISFILTERED('C'[CNaims]);CALCULATE ( SUM ('Test_main'[CommonSum] ); ALLexcept('test_main';Test_main[Client]); 'Test_main'[CommonSum] >= EARLIER ( 'Test_main'[CommonSum])); /* NoFilters */ CALCULATE ( SUM ('Test_main'[CommonSum] ); ALL/*EXCEPT*/('test_main'/*;'Test_main'[Client];Test_main[Manager]*/ ); 'Test_main'[CommonSum] >= EARLIER ( 'Test_main'[CommonSum])))))
but without position of flags has on result last variant only
how me to change the code to take other 3 variants?
Solved! Go to Solution.
good noon!
the probles soluted thouth ALLSELECTED
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.