Forum Discussion
Anonymous
7 years agoNot applicable
Create Measure not Affected by Filter
Hi, I have created a measure that outputs the ratio of the number of hours worked to the number of guests in a hotel location. I would like the create a second measure that performs the same c...
Anonymous
7 years agoNot applicable
Hi,
I have created a measure that outputs the ratio of the number of hours worked to the number of guests in a hotel location. I would like the create a second measure that performs the same calculation but for the company as a whole, and therefore should not be affected by filters (such as location). I will use the two measures in a line chart that will show one line for the selected location and one line for the company. I have tried to modify my code using the "ALL" function, but the output values are not correct. Below is my code for the location specific meaure and the version (non-working) for the company measure that should not be affect by filters.
Thank you for your help.
Hour_Guest_Ratio_Location = divide(
Calculate(sum(Labor[DailyLabor]),filter(Labor,Labor[Labor_report_description]="Total Paid (D + I)")),
Calculate(sum(vDSPDdaily_PowerBI[DailyValueRound] ),
filter(Category,Category[CategoryLabel]="Guests in House"
||Category[CategoryLabel]="Guests in Transit"
||Category[CategoryLabel]="Guests in Limbo")))Hour_Guest_Ratio_Company = divide(
Calculate(sum(Labor[DailyLabor]),filter(ALL(Labor),Labor[Labor_report_description]="Total Paid (D + I)")),
Calculate(sum(vDSPDdaily_PowerBI[DailyValueRound] ),
filter(ALL(Category),Category[CategoryLabel]="Guests in House"
||Category[CategoryLabel]="Guests in Transit"
||Category[CategoryLabel]="Guests in Limbo")))