cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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!






New Animated Dashboard: Sales Calendar


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.


Go to My LinkedIn Page


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!






New Animated Dashboard: Sales Calendar


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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors