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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Archiv_Internet
Frequent Visitor

Need Help with Dax

Hi,

         I have a table as below sample, I would like to get or count the Order Numbers ( the highlighted ones) were only Product A AND Product B have values in them and I would like to ignore the other Order Numbers were there is only one value in either of them

Archiv_Internet_0-1668615310565.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Archiv_Internet ,

Please refer to my pbix file to see if it helps you.

value = CALCULATE(MAX('Table'[order number]),FILTER(ALL('Table'),'Table'[A]<>BLANK()&&'Table'[B]<>BLANK()&&'Table'[order number]=SELECTEDVALUE('Table'[order number])))

Then filter the measure is not blank.

vpollymsft_0-1668670075907.png

If it still does not help, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

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

Hi, I tried it but I have 2 Tables connected by a product key, so Table 1 has the Order No/ProductKey and Table 2 has the Products A and B. So I am not able to refer a single table as it is in your example.

Anonymous
Not applicable

Hi @Archiv_Internet , 

Could you please provide your pbix file without privacy information and desired output with more details.

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

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

daXtreme
Solution Sage
Solution Sage

[measure] =
CALCULATE(
    COUNTROWS( T ), // T - your table
    KEEPFILTERS( NOT( ISBLANK( T[Product A] ) ) ), 
    KEEPFILTERS( NOT( ISBLANK( T[Product B] ) ) )
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.