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 everyone!
Hope you can help me this time 🙂
I am performing the analysis and I need to show the correct total of the measure.
Here is an example of the table on which I am working now and the column which I should calculate. This column is a measure (actions/hours).
I tried to use this formula but ot doesnt give the correct total.
Solved! Go to Solution.
Hi @Anonymous,
Change you measure to something like this
Total test = VAR Actions = DIVIDE ( 'General'[Actions], 'General'[Total Hours], 0 ) RETURN IF ( HASONEFILTER ( 'General'[Person] ), Actions, SUMX ( ALLSELECTED ( 'General'[Person] ), Actions ) )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @dariadb,
To wha I could get from your sample file your issue is regarding the way you calculate your measures so the best way is to create the following measures:
Actions = IF ( HASONEFILTER ( Table[Name] ); DIVIDE ( [Actions Measure]; [Hours Measure]; 0 ); SUMX ( ALLSELECTED ( Table[Name] ); DIVIDE ( [Actions Measure]; [Hours Measure]; 0 ) ) )
Total hours Worked Total = IF ( HASONEFILTER ( Table[Name] ); [Hours Measure]; SUMX ( ALLSELECTED ( Table[Name] ); [Hours Measure] ) )
The Actions Measure and Hours Measure are your two base measures that you can use to make the calculations.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
Change you measure to something like this
Total test = VAR Actions = DIVIDE ( 'General'[Actions], 'General'[Total Hours], 0 ) RETURN IF ( HASONEFILTER ( 'General'[Person] ), Actions, SUMX ( ALLSELECTED ( 'General'[Person] ), Actions ) )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
I send out a response to you message, please check it.
Regards,
Mfelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @dariadb,
To wha I could get from your sample file your issue is regarding the way you calculate your measures so the best way is to create the following measures:
Actions = IF ( HASONEFILTER ( Table[Name] ); DIVIDE ( [Actions Measure]; [Hours Measure]; 0 ); SUMX ( ALLSELECTED ( Table[Name] ); DIVIDE ( [Actions Measure]; [Hours Measure]; 0 ) ) )
Total hours Worked Total = IF ( HASONEFILTER ( Table[Name] ); [Hours Measure]; SUMX ( ALLSELECTED ( Table[Name] ); [Hours Measure] ) )
The Actions Measure and Hours Measure are your two base measures that you can use to make the calculations.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous
Can you share some base data or the pbix
Regards
Affan
Unfortunately I can't share it due to confidentiality
@Anonymous
What's the purpose of using hasonefilter formula? I think DIVIDE('General'[Actions],'General'[Total Hours],0) can work correct.
Thanks and BR
Ryan
Proud to be a Super User!
Because using just divide function it doesnt show the correct total of the column.
As there is a Person filter (for each row) I used hasonefilter to calculate total.
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 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |