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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
katemke
Frequent Visitor

Graphing two counts onto same visual with multiple date columns

I have a table that contains data similar to what is below (has been created from two distinct tables already:

 

HP IDRC IDContact DateContact IDConsent Date

10

13/10/20211.13/1/2021
null23/10/20212.1null
null23/11/20212.2null
11nullnullnull3/2/2021
1233/3/20213.13/1/2021
1233/3/20213.23/1/2021
1343/5/20214.13/5/2021

 

i have also created a simple date table and created relationship (one active, one inactive) with the two date columns in the table above

 

I am trying to create a single visual that will chart the number of contacts (distinct count of Contact IDs) on a single date and the number of consent (distinct count of HP ID's) on a single date - either as two disinct lines, or a bar/line graph, with the shared access being the date, but am not sure how to go about creating the correct measures to do so. 

 

Any help would be greatly appreciated. Thanks so much!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@katemke , If they are two tables - no column, with date table you can have two active join and you can work with count and sum measures from both tables

 

If they two dates from one table. One inactive relationship need to be activated using userelationship

And you need use common date from date table on slicer and axis

 

example

calculate( SUM(Sales[Sales Amount]),USERELATIONSHIP ('Table'2[CreateDate], 'Date'[Date]))

 

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@katemke , If they are two tables - no column, with date table you can have two active join and you can work with count and sum measures from both tables

 

If they two dates from one table. One inactive relationship need to be activated using userelationship

And you need use common date from date table on slicer and axis

 

example

calculate( SUM(Sales[Sales Amount]),USERELATIONSHIP ('Table'2[CreateDate], 'Date'[Date]))

 

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.