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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CheikhnaML
Frequent Visitor

Ignoring row context with DAX

Hello everyone,

I have the next two tables that are taken from my power BI report

 

 

CheikhnaML_1-1628696106802.png

 

 

 

The first table contains :

  •          Column 1 : « Comptenum & comptelib » is taken from my table of facts called « FEC » : its the account number & its name
  •          Column 2 : « Montant » represents the amounts ; is also taken from my table of facts « FEC » but I renamed it for this specific table. The real name in the table is « Solde »
  •          Column 3 : is a measure that counts the number of amounts per account number

I put a filter on column 3 that basically says : only show me the accounts that have duplicated amounts (ie count of « #count soldes » is >= 2). Also, there is filter applied on the table the takes only accounts that start with « 6 » from a column called FEC[Classe].

 

The second table is the same as the first one but contains an additional column called « Date & Jnl & ref & Lib » that I simply took from my table of facts « FEC ».

My objectif is to do the same calculation as the « Count soldes » measure in my first table but I want it to show the same result as the first table.

 

 In other words I want it to ignore the context that is coming from the additional column that I added « date & jnl & ref & lib ».

 

My objectif is to create a better user experience by allowing him to click on one row from the first table and see the details on the second table and keep both coherent for the count measures .

 

I already tried this DAX formula

 

#Count soldes détails_A1 =

CALCULATE(

    COUNT(FEC[SOLDE]),

    FEC[Classe] = "6",

    ALLEXCEPT(

        FEC,

        FEC[Comptenum & comtelib],

        FEC[SOLDE]

    )

But it is showing me the total number of amounts in each account.

I tried it also with the ALL function using this formula :

 

#Count soldes détails_A1 =

CALCULATE(

    COUNT(FEC[SOLDE]),

    FEC[Classe] = "6",

    ALL(FEC),

    VALUES(FEC[Comptenum & comtelib]),

    VALUES(FEC[SOLDE])

       

)

But it shows a different result also.

Thank you in advance for your help.

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @CheikhnaML ,

 

It is not clear whether you can provide test data (delete sensitive information) and expected results. I will answer for you as soon as possible.


Looking forward to your reply.


Best Regards,
Henry

 

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @CheikhnaML ,

 

It is not clear whether you can provide test data (delete sensitive information) and expected results. I will answer for you as soon as possible.


Looking forward to your reply.


Best Regards,
Henry

 

Hello @v-henryk-mstf , 

Thank you for your answer. I appreciate your help. 

I finally was able to find the solution myself. I used the ALLEXCEPT DAX formula to make it worK.

I am user of excel and I am new to all this Power Bi and DAX world. 

Thank you and have a good day.  

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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