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

2 date columns 2 status columns

Hi,

I have 2 staus columns i,e Current_Status & Approved_Status and I have separate date columns for each status as Current_Status_Date & Approved_Status_Date, I need to show both the staus in 2 different bar graphs and I should use a date column as a slicer, that date colum should be in month values.

DateNumberCurrent_StatusCurrent_Status_DateApproved_StatusApproved_Status_Date
01/01/2020ABC123In Review01/03/2020Approved01/02/2020
01/02/2020BCD123Cancelled01/04/2020  
01/02/2020DEF123Remediated01/03/2020Approved01/04/2020
01/03/2020EFG123Peniding Remediation01/05/2020  
01/03/2020GHI123Cancelled01/05/2020Approved01/04/2020
01/04/2020IJK123In Review01/05/2020  
01/06/2020LMN123Risk01/08/2020Approved01/05/2020
01/06/2020MNO123In Review01/08/2020Approved01/05/2020
01/06/2020NOP123Remediated01/08/2020Approved01/05/2020

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

I create a new column to get the date of [Updated] column and use it to replace [Updated] column in the inactive relationship with Date table.

 

Updated Date = RADsNew[Updated].[Date]

 

Then I create a measure to count the number with USERELATIONSHIP function and put it in the chart as value. You can change the name of this measure as you like.

 

Measure = CALCULATE(COUNT(RADsNew[Number]),USERELATIONSHIP(Dates_Table[Date],RADsNew[Updated Date]))

 

111201.jpg

 

Please download the pbix here.

 

Regards,

Jing

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Anonymous , Not very clear. You can join both dates with the same date table and you will get active/inactive joins. You can activate a join using use relation.

 

See example -https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

Anonymous
Not applicable

@amitchandak ,

I was looking for the same requirment and I am following the same steps but still I dint get correct values, I should get 28 cancelled in the month of Aug.

image.pngimage.pngimage.png

Hi @Anonymous 

Is this what you required?

10191.jpg

You can download this .pbix, hope it is helpful. 

 

Community Support Team _ Jing Zhang

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

Anonymous
Not applicable

@v-jingzhang ,

This what is my requirment, but when I am trying to the same on my orginal table I am not able to get the same values.

Attaching the pbix file.

https://drive.google.com/file/d/1BO987hAGdzK6a4FKjBcij-daFMKnRlCN/view?usp=sharing .

 

 

Example : In Aug 2020 cancle value should be 28 but I am not getting the same.

 

Hi @Anonymous , can you share the link again? It says I need access rights to this file when I try to open it. Thanks.

Anonymous
Not applicable

@v-jingzhang here is the link https://drive.google.com/file/d/1BO987hAGdzK6a4FKjBcij-daFMKnRlCN/view?usp=sharing

if you still get same error please request access as I dont know how to provide access to every1.

 

Hi @Anonymous 

I create a new column to get the date of [Updated] column and use it to replace [Updated] column in the inactive relationship with Date table.

 

Updated Date = RADsNew[Updated].[Date]

 

Then I create a measure to count the number with USERELATIONSHIP function and put it in the chart as value. You can change the name of this measure as you like.

 

Measure = CALCULATE(COUNT(RADsNew[Number]),USERELATIONSHIP(Dates_Table[Date],RADsNew[Updated Date]))

 

111201.jpg

 

Please download the pbix here.

 

Regards,

Jing

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.