cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
hamadani
Frequent Visitor

Shared X axis for multiple dates and Count of occurrence on Y axis

Hi,

I have a table similar to below

Case ID      Deadline 1       Deadline 2    Deadline 3    Deadline 4     
ADec 2022Feb 2023May 2023Jun 2024
B Jul 2020May 2023Aug 2024
CMay 2019Jul 2020Dec 2021 
DJul 2020Mar 2021Apr 2021Aug 2024
EMay 2019 May 2023Aug 2024
FDec 2022Feb 2023May 2023Aug 2024
GDec 2022Feb 2023May 2023Aug 2024

 

I would like to have a graph with single x axis as date (from min(date) of above table to max(date)) and then number of cases who have a deadline for a given date.  So, I am expecting something similar to below:

hamadani_1-1668078588945.png

 

Thanks

 

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

Hi @hamadani ,

 

This is my test table:

vyadongfmsft_0-1668413758842.png

 

Select "Case ID" and Unpivot other columns:

vyadongfmsft_1-1668413869590.png

 

You will get a table like this:

vyadongfmsft_2-1668413903659.png

 

Close and apply to Power BI, create a measure:

 

Count of case =
CALCULATE (
    COUNT ( 'Table'[Case ID] ),
    FILTER ( 'Table', 'Table'[Value] = SELECTEDVALUE ( 'Table'[Value] ) )
)

 

 

Create a scatter visual:

vyadongfmsft_3-1668414148191.png

 

I think this is the result you want.

 

Best regards,

Yadong Fang

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

3 REPLIES 3
v-yadongf-msft
Community Support
Community Support

Hi @hamadani ,

 

This is my test table:

vyadongfmsft_0-1668413758842.png

 

Select "Case ID" and Unpivot other columns:

vyadongfmsft_1-1668413869590.png

 

You will get a table like this:

vyadongfmsft_2-1668413903659.png

 

Close and apply to Power BI, create a measure:

 

Count of case =
CALCULATE (
    COUNT ( 'Table'[Case ID] ),
    FILTER ( 'Table', 'Table'[Value] = SELECTEDVALUE ( 'Table'[Value] ) )
)

 

 

Create a scatter visual:

vyadongfmsft_3-1668414148191.png

 

I think this is the result you want.

 

Best regards,

Yadong Fang

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

hamadani
Frequent Visitor

Thank you @amitchandak . However, could you please elaborate on what you mean by "joining all of them"? All data is stored in one table 

amitchandak
Super User
Super User

@hamadani , Join all of them with a common date table and use date from date table on axis.

 

Other than one join all other joins will be inactive, use userelationship for that

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors