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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
zuziak88
New Member

line chart showing different values than dax

Hi,

 

I have issue with line chart. I would like to show how many leavers and new joiners we had in 2018-2023. When I use dax to calculate it is showing proper values. However line chart is showing different values for leavers -- 596(ok) vs 169(not ok) in 2023. Would appreciate your help.

Many thankshttps://www.dropbox.com/scl/fi/zs5v0migkpeolms11l8lc/Exercise.pbix?rlkey=lhmz1dkf2wokqetvjyjjlztyi&s... line chart.png

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@zuziak88 

You have two different date columns in your fact table, start and end dates, I created an inactive relationship from Date[Date] to TrainingTable[Exit Date] and the following meaures :

Leavers 1 = 
CALCULATE(
    DISTINCTCOUNT( Employee_Training_Table[empid] ),
    USERELATIONSHIP( 'Date'[Date] , Employee_Training_Table[exitdate] )
)
New Joiners 1 = 
    DISTINCTCOUNT( Employee_Training_Table[empid] )

 

Fowmy_0-1739271798232.png


File attached, you may use these measure where necessary 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@zuziak88 

You have two different date columns in your fact table, start and end dates, I created an inactive relationship from Date[Date] to TrainingTable[Exit Date] and the following meaures :

Leavers 1 = 
CALCULATE(
    DISTINCTCOUNT( Employee_Training_Table[empid] ),
    USERELATIONSHIP( 'Date'[Date] , Employee_Training_Table[exitdate] )
)
New Joiners 1 = 
    DISTINCTCOUNT( Employee_Training_Table[empid] )

 

Fowmy_0-1739271798232.png


File attached, you may use these measure where necessary 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.