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
njd_1988
New Member

Calculate Percent by Column Total DAX Measure

Hello, Power BI Community! 

 

I'm attempting to create a DAX measure that will calculate percent by column total that accounts for week over week data and a subgroup. I've been researching this for the past week and i'm unable to find a formula that works. Since i'm using a slicer to switch between different metrics, i'm unable to use the "show value as" feature. I've included the organization and some sample data below along with the column names below. Overall, i'm wanting to find week over week volume for the number of calls that come from specific states and cities. If I need to include any additional information, please let me know. Any help is greatly appreciated! Thanks! 

njd_1988_0-1638827937138.png

 

 

 

1 ACCEPTED SOLUTION
njd_1988
New Member

Thanks for the reply, @amitchandak! I'll also keep the feedback in mind for any future posts. When using your code, results came in as 100% for everything. I was able to figured it out after doing a little more research. Below is what I used. Let me know if you have any feedback. 

CALC_SURVEY_VOLUME_WoW = DIVIDE(SUM('Table'[Call]),CALCULATE(SUM('Table'[Call]),ALLSELECTED('Table'[State], 'Table'[City])))

View solution in original post

2 REPLIES 2
njd_1988
New Member

Thanks for the reply, @amitchandak! I'll also keep the feedback in mind for any future posts. When using your code, results came in as 100% for everything. I was able to figured it out after doing a little more research. Below is what I used. Let me know if you have any feedback. 

CALC_SURVEY_VOLUME_WoW = DIVIDE(SUM('Table'[Call]),CALCULATE(SUM('Table'[Call]),ALLSELECTED('Table'[State], 'Table'[City])))
amitchandak
Super User
Super User

@njd_1988 , the subject and description not working together , if need % for a column say week ending date

% of week = divide(sum(Table[Call]) , calculate(sum(Table[Call]), filter(allselected(Table), Table[State] = max(Table[State]) && Table[City] = max(Table[City]) ) ) )

 

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.