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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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