Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
RajaaB
Frequent Visitor

Calculate Location Quotient DAX measure

Hi Folks,

I hope someone can help me with this, I have the following table in PowerBI and i would like to calculate the location quotion for each line which would be the "%row total" /  ("column total" / "grand total")

 

Insert photos function is not working correctly to post the image

Area Sum of Non-Tech %RT Non-Tech Sum of Tech %RT TechTotalTotal %RT 
Ajax                   24,57097.38%               6602.62%25,230100.00%
Brock                     2,43599.59%                 100.41%2,445100.00%
City of Oshawa                   45,54595.90%            1,9454.10%47,490100.00%
City of Pickering                   27,19592.97%            2,0557.03%29,250100.00%
Clarington                   19,25595.75%               8554.25%20,110100.00%
Scugog                     6,29098.90%                 701.10%6,360100.00%
Total                125,29095.73%           5,5954.27%130,885100.00%

 

The final table should look like this:

 

Area Sum of Non-Tech %RT Non-TechLQ Non-Tech Sum of Tech %RT TechLQ TechTotalTotal %RT 
Ajax                     24,57097.38%1.02                  6602.62%0.6125,230100.00%
Brock                        2,43599.59%1.04                    100.41%0.102,445100.00%
City of Oshawa                     45,54595.90%1.00              1,9454.10%0.9647,490100.00%
City of Pickering                     27,19592.97%0.97              2,0557.03%1.6429,250100.00%
Clarington                     19,25595.75%1.00                  8554.25%0.9920,110100.00%
Scugog                        6,29098.90%1.03                    701.10%0.266,360100.00%
Total                   125,29095.73%               1.00              5,5954.27%      1.00130,885100.00%

 

"LQ Non-Tech" column was calculated as follows:

 

Area

LQ Non-Tech
Ajax97.38% / 95.73% =
Brock99.59% / 95.73% =
City of Oshawa95.90% / 95.73% =
City of Pickering92.97% / 95.73% =
Clarington95.75% / 95.73% =
Scugog98.90% / 95.73% =
Total 95.73% / 95.73% 

 

I have filters applied on my data which means that those values will change based on the selected filters.

 

Thanks,

 

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@RajaaB ,

 

The given info is not enough. I guess '%RT Non-Tech' is a measure, right? Could you share the dax code so that I could analysis it?

 

Regards,

Jimmy Tao

@v-yuta-msft ,

 

I calculated the '%RT Non-Tech' using this measure:

 

%RT Non-TECH = DIVIDE(SUM( POW_NOCS_UPOW_2016[  Usual place of work] ),
        CALCULATE(
            SUM( POW_NOCS_UPOW_2016[  Usual place of work] ),
            ALLSELECTED( POW_NOCS_UPOW_2016 )
        )
    ) 

 

 

I was also able to get the same results using the "show values as percent of row total":

 

Current_Table_Row_Total2.PNG

thanks,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.