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

Need help with Summarize function

Hello,

 

I have two tables like TBL and CUST. I have created the CUST table using the DAX.

CUST=
ADDCOLUMNS(
SUMMARIZE(FILTER(TBL,NOT(TBL[Account])=BLANK()),TBL[Account ],
"Sale",CALCULATE(SUM(TBL[Sale Amount]),FILTER(TBL,TBL[Ind]="Yes"),FILTER(TBL,TBL[Ind2]="Yes" && NOT(TBL[Code]) IN {"4"} ))
),
"Grp",
IF ( [Premium] >=0 && [Premium]<100, "0-100",IF ( [Premium] >=100&& [Premium]<500, "100-500",IF ( [Premium] >=500 && [Premium]<1000, "500-1000M",IF ( [Premium] >=1000, "1000+" )))))
Now, I have created a relationship between those two tables using "Account" column and created a Cust Grp column in TBL using Related(CUST[Grp]). I want build a customer count based on grouping. 
Problem:
Counts were fine when there were no filters applied but when I apply a filter on TBL tables Sale amount in CUST table is not filtering(I selected filtering as Both direction). As a result, counts in the group are not being calculated properly. 
For example, if I filter country in TBL to the "USA" the premium in the CUST table is not changing.
 
Please help me out!!!!
Thanks in advance!!!!!
1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @srikanthgunnam ,

More details will be helpful.

If it is convenient, could you share your data sample which could reproduce your scenario and your desired output so that we could help further on it?

Please refer to how to get your question answered quickly.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
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.