cancel
Showing results for
Did you mean:
Helper I

## Plot two lines with count of date on a reference axis

Hi,

my columns in a table look like this:

 start end 09.03.2021 null 09.03.2021 15.03.2021 09.03.2021 15.03.2021 15.03.2021 15.03.2021 15.03.2021 19.03.2021 16.03.2021 23.03.2021

the start and end columns have a relationship to a dim_time table in the model.

Now i want to plot the count per date on a referenced time axis.

E.g. for the 15.03.2021 the should be: 2 for count of start and 3 for count of end.

How do I achieve this?

1 ACCEPTED SOLUTION
Community Support

Hi, @thale

According to your description, you want to get a plot on a shared time axis, I think you can try to create a line chart like this:

And I guess this can be what you want.

You can download my test pbix file here

If this result is not what you want, you can post some sample pictures to show your expected result.

How to Get Your Question Answered Quickly

Best Regards,

Community Support Team _Robert Qin

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

5 REPLIES 5
Community Support

Hi, @thale

According to your description and sample data, I think you can try to create measures to achieve this, you can try my steps:

1. I created a calendar table for the slicer:
``Date = CALENDARAUTO()``
1. Then I create two measures:
``````count of start =

COUNTX(FILTER(ALL('Table'),[start]=MAX('Date'[Date])),[start])``````
``````count of end =

COUNTX(FILTER(ALL('Table'),[end]=MAX('Date'[Date])),[end])``````
1. Then create a slicer to place ‘Date’[Date] and two card charts to place the measures:

And you can get what you want.

You can download my test pbix file here

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly

Best Regards,

Community Support Team _Robert Qin

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

Helper I

Well, that is no help at all. I want a plot on a shared time axis and not a filter with a count.

Community Support

Hi, @thale

According to your description, you want to get a plot on a shared time axis, I think you can try to create a line chart like this:

And I guess this can be what you want.

You can download my test pbix file here

If this result is not what you want, you can post some sample pictures to show your expected result.

How to Get Your Question Answered Quickly

Best Regards,

Community Support Team _Robert Qin

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

Super User IV

@thale , you need to use userelationship

The assumed start is active

Start Count = CALCULATE(COUNTrows(Table]),USERELATIONSHIP(Table[Start Date],'Date'[Date]) )

end count = CALCULATE(COUNTrows(Table]),USERELATIONSHIP(Table[End Date],'Date'[Date]),not(ISBLANK(Table[End Date])))

refer

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

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helper I

Thank you. What kind of formular is that? Where should I put this formular? Would appreciate if you start one step earlier. 🙂

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

#### Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

#### Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors