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

Sync two columns for visualization

Hello,

 

I have a data like this

 

PersonID  TransactionID  TransactionMonth  Training   TrainingMonth

1               X1                    January 2020          C1            February 2020

1               X2                    February 2020        C2            February 2020

2               X3                    February 2020        C2            February 2020

 

I want to summarize it like below :

 

Month                 # Transactions       # Trainings

January 2020       1                             0

February 2020     2                             3

 

How do I sync the two months onto a common month so I can show both metrics?

 

Many Thanks!

 

1 ACCEPTED SOLUTION
HashamNiaz
Solution Sage
Solution Sage

Hi !

Try creating anther inactive relatioship between your date & training month column.

Then write DAX by utilizing this inactive relationship. You can watch following video on how to implement this in your scenario;

https://www.youtube.com/watch?v=ppxcpuNMBoE&feature=youtu.be&t=86 

Regards,

View solution in original post

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @EshaanG ,

 

//measure
Transactions = 
CALCULATE(
    COUNT(Sheet4[  TrainingMonth]),
    ALLEXCEPT(
        Sheet4,
        Sheet4[TransactionMonth ]
    )
)
//measure
Trainings = 
VAR x = 
CALCULATE(
    COUNT(Sheet4[  TrainingMonth]),
    FILTER(
        ALL(Sheet4),
        Sheet4[  TrainingMonth] = MAX(Sheet4[TransactionMonth ])
    )
)
RETURN
IF(
    x = BLANK(),
    0,
    x
)

aaa5.PNG

 

Best regards,
Lionel Chen

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

HashamNiaz
Solution Sage
Solution Sage

Hi !

Try creating anther inactive relatioship between your date & training month column.

Then write DAX by utilizing this inactive relationship. You can watch following video on how to implement this in your scenario;

https://www.youtube.com/watch?v=ppxcpuNMBoE&feature=youtu.be&t=86 

Regards,

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.