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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX calculation or table with context

Hi, I want to create a line chart with multiple lines, here is the origin data

so the data should be transformed to this:

dim            value_a   value_b value_c 
6-30    10                  3         4
31-60   20                 5          7
>60      2                 9          23

I am new to use DAX, how can I create calculation or table use DAX to create these columns(dim, value a b c) and consider context with post_man, grade?

Thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , create a common dimension with these values 6-30days, 31-60days, etc

 

Join with three columns dim_a, dim_b, dim_c , Two joins will be inactive and you can activate it using userelationship in a measure

 

example

calculate(count(Table[dim_b], userelationship(Table[Dim_b], dim[dim]) )

 

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

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , create a common dimension with these values 6-30days, 31-60days, etc

 

Join with three columns dim_a, dim_b, dim_c , Two joins will be inactive and you can activate it using userelationship in a measure

 

example

calculate(count(Table[dim_b], userelationship(Table[Dim_b], dim[dim]) )

 

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

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

@amitchandak Thank you. Do you mean join three column is to build relationship between two tables? But  it's unable to bulit relationship of 3 columns with another column.

If the relation is inactive, can it still calculation the real value with these3 calculation? as I use these calculations as value-axis and dimension table as the x-axis to make up a multiple line chart

Anonymous
Not applicable

Tried it, works well

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors