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
Vito
Helper I
Helper I

Same value showing in two separated columns on matrix table two distinct count

Hi all,

I can't figure out why the matrix is showing a matrix like this

Vito_3-1673428870449.png

 

with this dax of the addedd column:

Condition Real Time = if(and(OIS[Status]="Certified",and(OIS[MOnthCert] <= 9,month(OIS[10 Date Certified]) <= month(today()))),"Within 9 Months","Longer than 9 months/Not certified yet")

 

While with a slightly different dax expression:

Condition = if(and(OIS[Status]="Certified",OIS[MOnthCert] <= 9),"Within 9 Months","Longer than 9 months/Not certified yet")

 

I got the correct matrix

Vito_2-1673428530494.png

 

I am scratching my head  but can't figure out were is the issue.

Thank you for helping.

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @Vito ,

 

I looked at your first dax, do you mean that when the three conditions of OIS[Status]="Certified", OIS[MOnthCert] <= 9, month(OIS[10 Date Certified]) <=month(today()), output "Within 9 Months", and vice versa output "Longer than 9 months/Not certified yet"?

 

According to the documentation, if you need to perform an AND operation on multiple expressions, it is recommended that you use the AND operator ( &&) to join them all in a simpler expression.
You can try:

 

Condition Real Time =
IF (
    OIS[Status] = "Certified"
        && OIS[MOnthCert] <= 9
        && MONTH ( OIS[10 Date Certified] ) <= MONTH ( TODAY () ),
    "Within 9 Months",
    "Longer than 9 months/Not certified yet"
)

 

Please refer to the following document for more information.

And (&&) – DAX Guide

DAX AND OR IN or syntax(&& ||) – Which one? - The Excel Club

 

Best Regards,

Neeko Tang

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

 

Thank you for your reply.

But it seems not to be working

Vito_0-1673860795324.png

 

 

Hi @Vito ,

 

I'm sorry I can't understand your needs, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

No bother anymore, I think the issue is with the dataset itself of the pbix file. When I apply the same formula to the existing report on the RS or to the sample data, it works fine.

Thank you for helping anyway.

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.