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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Exclude 1 Attribute with Total still running

Hii PBI Maestro

I have calculation in matrix but the total to be zero when I exclude 1 attribute (PUSAT).
my goal I wanna exclude 1 attribute (PUSAT) without missed the running total.

rifk1_0-1708662408049.png

 



 

 

BO1 = 
var y = COUNTROWS(FILTER(SUMMARIZE(SALES, master_BP[BP]),master_BP[BP] <> BLANK()))
var x = IF(HASONEVALUE(master_SC[Reg Short]),MAX(master_SC[Reg Short])<>"PUSAT",BLANK())
var z = CALCULATE(IF(x=False,0,y),ALL(Sales))
RETURN
IF(x=False,0,y)

 

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous  you can use formula like mine (just modify with your parameters) :

cumulative_Whitd_d_0 =
if (HASONEFILTER('Table'[category]),
 if (max('Table'[category])="d",0,
 CALCULATE(

       [sum_],

        FILTER(

            ALL('Table'),

            ISONORAFTER('Table'[category],max('Table'[category]),DESC)

        ))),
       CALCULATE(

       [sum_],

        FILTER(

            ALL('Table'),

            ISONORAFTER('Table'[category],max('Table'[category]),DESC)

        ),'Table'[category]<>"d"))
Ritaf1983_0-1708667115602.png

pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Anonymous  you can use formula like mine (just modify with your parameters) :

cumulative_Whitd_d_0 =
if (HASONEFILTER('Table'[category]),
 if (max('Table'[category])="d",0,
 CALCULATE(

       [sum_],

        FILTER(

            ALL('Table'),

            ISONORAFTER('Table'[category],max('Table'[category]),DESC)

        ))),
       CALCULATE(

       [sum_],

        FILTER(

            ALL('Table'),

            ISONORAFTER('Table'[category],max('Table'[category]),DESC)

        ),'Table'[category]<>"d"))
Ritaf1983_0-1708667115602.png

pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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