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
FOXYBARK
Helper I
Helper I

How to calculate a simple sum of [measure] to use in a % of total calculation

Hi. 

I would like to have a calculation to show my total sum of [Daily Badge Counts] (168431). My attempt to show this is in my [test2] calc below. [Daily Badge Counts] is a measure. Ultimately, I want to calc a % of grand total. 

 

I have the following table to show my existing data. 

FOXYBARK_0-1686068976974.png

Here is my [test2] meaure. 

test2 = CALCULATE(
[Daily Badge Counts],
all(Badge[BADGE_SCAN_DAYOFWK_TXT]))

 

Daily Badge Counts = CALCULATE(DISTINCTCOUNT(Badge[Badge&Date ID]))
 
Thanks
1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @FOXYBARK , try measure

test2=

DIVIDE([Daily Badge Counts],
    CALCULATE(
        [Daily Badge Counts],
        ALL(SHEET17)
    )
)
 
SHEET17 replace with your table name. I hope this help




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
some_bih
Super User
Super User

Hi @FOXYBARK , try measure

test2=

DIVIDE([Daily Badge Counts],
    CALCULATE(
        [Daily Badge Counts],
        ALL(SHEET17)
    )
)
 
SHEET17 replace with your table name. I hope this help




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Thank you. I ended up using the ALLSELECTED to accomodate my data. But it works. 

test2=

DIVIDE([Daily Badge Counts],
    CALCULATE(
        [Daily Badge Counts],
        ALLSELECTED(SHEET17)
    )
)

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.

Top Solution Authors