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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

SUMIF when having a filter in the dashboard

Hi, I am having lots of difficulties with a formula that should be very easy.

 

This is the model:

attribute_table -> Table AT

id_seassonseasson
1Winter
2Spring
3Summer
4Autom

 

transactional_table -> Table TT

id_seassonid_personsales
11100
12250
23300
24250
35150
46500

 

Notice that both table are related by id_seassons. This relation is already built in DAX.

 

I would like to show the id_person, sales and the sales for the agregation of the seasson for a filter specify in the dashboard. For example:

 

Filter in the dashboard seasson = Winter
    
id_seassonid_personsalesseassonal_sales_aggreated
11100350
12250350

 

This is working fine: seassonal_sales_aggreated = CALCULATE(SUM(TT[sales];id_seasson=1). BUT I am not able to find a way to make the filter change as it change in the dashboard and to relate this filter to a field out of the TT table (i.e. AT[seasson]. This would be the idea:

seassonal_sales_aggreated = CALCULATE(SUM(TT[sales];id_seasson=seasson). I know the red part is not ok, but that would be the idea.

 

Thanks a lot

1 ACCEPTED SOLUTION
Anonymous
Not applicable

How I have temporarely solve this is creating a new table that is a group by id_seasson (NT = SUMMARIZE (TT;TT[id_seasson];sales;TT[sales])) and then join by TT with NT on TT[id_seasson].

 

I am sure there is a formula to do this, without this table creation process.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Correction:

 

This is working fine: fine: seassonal_sales_aggreated = CALCULATE(SUM(TT[sales];TT[id_seasson]=1)

Anonymous
Not applicable

How I have temporarely solve this is creating a new table that is a group by id_seasson (NT = SUMMARIZE (TT;TT[id_seasson];sales;TT[sales])) and then join by TT with NT on TT[id_seasson].

 

I am sure there is a formula to do this, without this table creation process.

Hi @Anonymous,

 

The measure will respond to the slicers automatically. We don't need to assign the selected values in a measure. We only need to clear the context of [id_person] in your scenario. Please try the formula below.

seassonal_sales_aggregated =
CALCULATE ( SUM ( TT[sales] ), ALL ( TT[id_person] ) )

SUMIF-when-having-a-filter-in-the-dashboard

 

 

Best Regards,

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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