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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 41 | |
| 22 | |
| 17 |
| User | Count |
|---|---|
| 183 | |
| 114 | |
| 93 | |
| 62 | |
| 45 |