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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Merge in a single Line Chart two visuals with different dates columns

1.PNG2.PNG3.PNG

4.PNG
Dear PowerBi Community,

I would like to share you a problem that I'm facing right now:

I have two differents columns dates (IFD Actual and IFD Planned) that after counting them  (Dax formule in the 3rd picture), I would like to show in the same graph as I was capable to do in Excel. I tried to use one unique calendar table with USERELATIONSHIP without any particular success. Last remark: the two graphs separetely show the correct information as you may see in the second picture.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to create a virtual table in var and then calculate the running total.

My measure:

IFD_Actual = 
VAR _VIRTUAL_TABLE =
    ADDCOLUMNS (
        ALL ( 'Date 1' ),
        "TEST",
            CALCULATE (
                COUNT ( 'MODEL 60'[IFD Actual] ),
                USERELATIONSHIP ( 'MODEL 60'[IFD Actual], 'Date 1'[Date] )
            )
    )
RETURN
    SUMX ( FILTER ( _VIRTUAL_TABLE, [Date] <= MAX ( 'Date 1'[Date] ) ), [TEST] )

In my sample, [Date] column in my table visual is from 'Date 1'. So the filter in sumx is [Date] (from virtual table) <= MAX('Date1'[Date]).

Note: We need to add the [Date] column in table visual in Max field in sumx filter.

RicoZhou_0-1649839326984.png

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , with inactive join you need to create measure

 

calculate(countrows(table),
USERELATIONSHIP ( 'Table'[IFD Actual], DimDate[Date] )
)

 

 

calculate(countrows(table),
USERELATIONSHIP ( 'Table'[IFD Planned], DimDate[Date] )
)

 

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

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Dear @amitchandak , thanks a lot for your reply, I tried as you indicated but it doens't work properly:5.PNGEDIT: I analysed carefully the problem and in the Userelationship I have to use IFD Actual and not IFD Planned as I did, the problem is that with IFD Actual , due to the filter that I'm using, the final graph is empty. So I have to find another way to do the same thing that the filter does 6.PNG

Anonymous
Not applicable

7.PNGI'm close, I need only that the IFD actual count has a cumulative function

Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to create a virtual table in var and then calculate the running total.

My measure:

IFD_Actual = 
VAR _VIRTUAL_TABLE =
    ADDCOLUMNS (
        ALL ( 'Date 1' ),
        "TEST",
            CALCULATE (
                COUNT ( 'MODEL 60'[IFD Actual] ),
                USERELATIONSHIP ( 'MODEL 60'[IFD Actual], 'Date 1'[Date] )
            )
    )
RETURN
    SUMX ( FILTER ( _VIRTUAL_TABLE, [Date] <= MAX ( 'Date 1'[Date] ) ), [TEST] )

In my sample, [Date] column in my table visual is from 'Date 1'. So the filter in sumx is [Date] (from virtual table) <= MAX('Date1'[Date]).

Note: We need to add the [Date] column in table visual in Max field in sumx filter.

RicoZhou_0-1649839326984.png

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.