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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
freginier
Solution Specialist
Solution Specialist

Repeat result sum on all rows

Hi all, 

 

I have this kind of table :

CategoryProjectAmount
CAT1Project110
CAT1Project220
CAT2Project330
CAT3Project4

40

CAT3Project5

50

 

I want to summurize CAT3 and repeat the value for all rows but I want don't display CAT3. 

Result expected :

CategoryProjectAmountCAT3
CAT1Project11090
CAT1Project22090
CAT2Project330

90

 

How can I do this with DAX ? 

 

Thank you ! 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Use this measure:

CAT3 value = CALCULATE (SUM(Table[Amount]), Table[Category] = "CAT3")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
Samarth_18
Community Champion
Community Champion

Hi @freginier ,

 

Create a measure as below :-

Measure =
CALCULATE (
    SUM ( 'Table'[Amount] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Category] = "CAT3" )
)

and now add filter as below on your visual:-

Samarth_18_0-1655200963113.png

 

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

PaulDBrown
Community Champion
Community Champion

Use this measure:

CAT3 value = CALCULATE (SUM(Table[Amount]), Table[Category] = "CAT3")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.