Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
82 | |
74 | |
66 |
User | Count |
---|---|
120 | |
105 | |
99 | |
81 | |
72 |