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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Regarding Matrix Column Total Calculation based on date selection

Hi,

I have to create a DAX which calculates the total of a column based on date and then divide the row total of that with the total value.

eg. 

NiMa_0-1653462984500.png

So, i want to create a measure which take amount total value based on date and calculate amount(%) by dividing individual row by total amount in the same way as shown in table.

 

Kindly suggest.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you Guys for the help..

I also tried using this :

 

Total = CALCULATE(Table[Amount],ALLEXCEPT(Table,Table[Date))

 

and it worked !!

 

Thanks for your help as well.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you Guys for the help..

I also tried using this :

 

Total = CALCULATE(Table[Amount],ALLEXCEPT(Table,Table[Date))

 

and it worked !!

 

Thanks for your help as well.

Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

You could create a measure as below:-

Measure =
VAR total =
    CALCULATE (
        SUM ( 'Table (2)'[Amount] ),
        ALL ( 'Table (2)'[Variety] ),
        'Table (2)'[Date] = MAX ( 'Table (2)'[Date] )
    )
RETURN
    DIVIDE ( MAX ( 'Table (2)'[Amount] ), total )

Refer attached file.

 

BR,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Hi

 

first measure , sales by day by variety==>

Total sales = sum(Fruit[Amount])
 
second measure , Total sales for the day==> 
Total sales day = calculate(sum(Fruit[Amount]),REMOVEFILTERS(Fruit[Variety]))
 
Third measure, calculate %
%sales = divide(Fruit[Total sales],Fruit[Total sales day],0)
JamesFr06_0-1653463792683.png

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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