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
Miguelgm28
Frequent Visitor

Divide Dax Formula by category

Hi everyone,

 

I wish to have a visual card of the information which has been circled in red at the end of the image.

 

I am trying to obtain the "total Project Average" which can be seen in the bottom of the first image to display this info on a card visual.

 

The column "Actual Weighted Completion" is calculated by multiplying the columns of "Completion" and "Weighted Task" together.

 

This total project average is calculated by summing the "Actual Weighted Completion" according to the respective project (e.g. Assignment 1). So the summation of the "Actual Weighted Completion" for assignment 1 is 56%, for assignment 2 is 0% and for assignment 3 is 100%.

 

Hence getting the average of these 3, you get the value of the "Total Project Average" of 52%. 

 

If you divide (to get the average) only the "Actual Weighted Completion" column you get the result of 10%, which is not the result I wish to obtain.

 

Was wondering if I could get some assistance on this and help me out.

 

Thank you in advance. 

 

 

 

Screenshot image1.png

 

1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @Miguelgm28 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675229705287.png

2. please try to create a new measure with below dax formula

Measure =
VAR tmp =
    SUMMARIZE (
        'Table',
        [Project],
        "Sum_CPL", SUM ( 'Table'[Actual Weighted Completion] )
    )
VAR _val =
    AVERAGEX ( tmp, [Sum_CPL] )
RETURN
    _val

3. add a card visual with measure

vbinbinyumsft_1-1675229766670.png

 

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @Miguelgm28 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675229705287.png

2. please try to create a new measure with below dax formula

Measure =
VAR tmp =
    SUMMARIZE (
        'Table',
        [Project],
        "Sum_CPL", SUM ( 'Table'[Actual Weighted Completion] )
    )
VAR _val =
    AVERAGEX ( tmp, [Sum_CPL] )
RETURN
    _val

3. add a card visual with measure

vbinbinyumsft_1-1675229766670.png

 

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-binbinyu-msft thank you so much for taking the time to help me out. Will give it a try, thanks again!

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