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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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