cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

Accepted Solutions
Highlighted
Helper I
Helper I

Re: Sync two columns for visualization

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

Re: Sync two columns for visualization

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

Highlighted
Community Support
Community Support

Re: Sync two columns for visualization

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.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors