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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
fatimaarshd
Helper I
Helper I

how to ignore column context in Summarize()

This is what my data looks like:

fatimaarshd_0-1698207212862.png

 

Please note this is just for category A. I have other categories as well. But all of them have channels and date and total orders etc. I want to calculate weekly sum for each category. However, I want to discount channel. I would like to show it in visual but the value of sum should be constant for all channels i.e. it shouldn't be affected by channel context.

In the above case. 524+532+499+412+617 = 2584

This solution works fine until I add another  column Channel into context. 

Weekly Notification Sum =
VAR _Distinct_ =
SUMMARIZE (
Consolidated,
Consolidated[Topic],
Consolidated[Date],
Consolidated[Total notifications]
)
RETURN
SUMX ( _Distinct_, Consolidated[Total notifications] )

 

How do I use All with it? When I use All it gives me incorrect values. 

 

Edit:

Tried this approach too. Same problem though 

test1 = CALCULATE (
SUM ( 'Consolidated'[Total Notifications] ),
FILTER (
ALL( 'Consolidated' ),
Consolidated[Notification End of Week] = max(Consolidated[Notification End of Week])
&& [Topic] = MAX ( Consolidated[Topic] )

), TOPN ( 1, 'Consolidated', 'Consolidated'[Notification End of Week], ASC )
)

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @fatimaarshd ,

Please have a try.

total_semana =
CALCULATE (
    SUM ( week_sum[suma_vta] ),
    ALLEXCEPT ( week_sum, week_sum[wnum], week_sum[Año] )
)
participacion_semanal =
DIVIDE ( week_sum[suma_vta], week_sum[total_semana] )

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-rongtiep-msft
Community Support
Community Support

Hi @fatimaarshd ,

Please have a try.

total_semana =
CALCULATE (
    SUM ( week_sum[suma_vta] ),
    ALLEXCEPT ( week_sum, week_sum[wnum], week_sum[Año] )
)
participacion_semanal =
DIVIDE ( week_sum[suma_vta], week_sum[total_semana] )

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

lbendlin
Super User
Super User

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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