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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
dolevh
Helper II
Helper II

Sum Measure with Filter

Hi, 

I'm looking for Dax that show me the Total Count
if (FirstDayofMonth = FirstDayofMonth and AreaID = AreaID and CityCode = CityCode and HoodID = HoodID).

 

My name of this table is: NadRe 

 

FirstDayofMonth   CustID AreaID  CityCode HoodID Count
1/1/2111111  120010010
1/1/2122222  120010020
1/1/2133333  120010030
1/1/2177777  240010100
1/1/2166666  240010200
2/1/2111111  12001001000
2/1/2122222  12001002000
2/1/2133333  12001003000
2/1/2177777  24001010,000
2/1/2166666  24001020,000

 

This is the result:  

FirstDayofMonth  HoodID  Count
1/1/21  100      60
1/1/21  10     300
2/1/21  100  6,000
2/1/21  1030,000

 

Thanks All !

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@dolevh  you can simply use this measure

Measure =
CALCULATE (
    SUM ( 'Table'[Count] ),
    ALLEXCEPT ( 'Table', 'Table'[FirstDayofMonth], 'Table'[HoodID] )
)

 

smpa01_0-1640536679505.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new table, and it uses SUMMARIZECOLUMNS function.

 

Picture1.png

 

Result Table =
SUMMARIZECOLUMNS (
NadRe[FirstDayofMonth],
NadRe[HoodID],
"Count", SUM ( NadRe[Count] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

smpa01
Super User
Super User

@dolevh  you can simply use this measure

Measure =
CALCULATE (
    SUM ( 'Table'[Count] ),
    ALLEXCEPT ( 'Table', 'Table'[FirstDayofMonth], 'Table'[HoodID] )
)

 

smpa01_0-1640536679505.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
ValtteriN
Super User
Super User

Hi,

This shoudl do what you want: 

Table 2 = SUMMARIZE('Summarize (2)','Summarize (2)'[FirstDayofMonth ],'Summarize (2)'[ HoodID],"Count",SUM('Summarize (2)'[ Count]))
ValtteriN_0-1640536042823.png


I hope this helps and if it does consider accepting this as a solution!





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.