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
Anonymous
Not applicable

Month Filter

Hi All,

 

I have two connected tables #Opens & #Clicks. "ID" is the common key or common column among the two tables and both have "dates" column. I have created a Card Visual for CTOR (Count of Clicks / Count of Opens). I also have to apply a date slicer for the visual but it doesmn't work. I am new to this. Kindly help.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description,I think you can create a date table first,and create two relationships with the two tables,then create two measure to calculate the desired result.

Like this:

Table 2 = CALENDAR(DATE(2019,1,1),DATE(2020,12,31))

COUNT of clicks = CALCULATE(COUNTROWS('#Clicks'),ALLSELECTED('Table 2'[Date]))

COUNT of open = CALCULATE(COUNTROWS('#Open'),ALLSELECTED('Table 2'[Date]))

6.png7.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description,I think you can create a date table first,and create two relationships with the two tables,then create two measure to calculate the desired result.

Like this:

Table 2 = CALENDAR(DATE(2019,1,1),DATE(2020,12,31))

COUNT of clicks = CALCULATE(COUNTROWS('#Clicks'),ALLSELECTED('Table 2'[Date]))

COUNT of open = CALCULATE(COUNTROWS('#Open'),ALLSELECTED('Table 2'[Date]))

6.png7.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

amitchandak
Super User
Super User

@Anonymous , if open and click has many to many join, They should be joined. You should create common dimesions/master table+ date table and join these two with that.

refer: https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

https://www.seerinteractive.com/blog/join-many-many-power-bi/

 

And :https://www.youtube.com/watch?v=Bkf35Roman8

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.