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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
onedayover
Helper III
Helper III

Help with a line and clustered column chart

Hi, I'm hoping someone can help me with how to do this. I have a table that looks like this...

dateregionattributevalue
1/07/2023GARtarget_202378
1/07/2023YXRtarget_202329
1/07/2023BMRtarget_202378
1/07/2023GARactual_202382
1/07/2023YXRactual_202331
1/07/2023BMRactual_202382
1/07/2024GARtarget_2024166
1/07/2024YXRtarget_202454
1/07/2024BMRtarget_2024180
1/07/2024GARactual_202482
1/07/2024YXRactual_202431
1/07/2024BMRactual_202482
1/07/2025GARtarget_2025248
1/07/2025YXRtarget_202581
1/07/2025BMRtarget_2025271
1/07/2026GARtarget_2026290
1/07/2026YXRtarget_202695
1/07/2026BMRtarget_2026315
1/07/2027GARtarget_2027310
1/07/2027YXRtarget_2027101
1/07/2027BMRtarget_2027338


The outcome I'm hoping for is a line and clustered column chart, where the line values are the summed if the attribute column contains "target" (Line y-axis) and the bars are summed if it contains "actual" (Column y-axis).

I will use a slicer that will filter this finished chart by region.
Thanks 🙂

1 ACCEPTED SOLUTION
Rakesh1705
Resolver III
Resolver III

Rakesh1705_0-1719809194490.png

This is the source data

Rakesh1705_1-1719809242998.png

Split column by "_" delimiter

Rakesh1705_2-1719809280860.png

Renaming the columns

Rakesh1705_3-1719809312004.pngRakesh1705_4-1719809327919.png

 

Created mesures for Actual and Target

 

Rakesh1705_5-1719809370972.png

 

Rakesh1705_7-1719809502991.png

 

Final output with target in line and actual in column and x axis (date) formatted in Categorical.

View solution in original post

7 REPLIES 7
Rakesh1705
Resolver III
Resolver III

Did you select line and clustered column chart from the visual

Rakesh1705_0-1719811498434.png

Also create the mesures as shown the prior snapshots.

Oh hang on, I forgot to change one thing in my original data. It's working now ... thanks so much!

Yes I did, that exact visual

Rakesh1705
Resolver III
Resolver III

Rakesh1705_0-1719809194490.png

This is the source data

Rakesh1705_1-1719809242998.png

Split column by "_" delimiter

Rakesh1705_2-1719809280860.png

Renaming the columns

Rakesh1705_3-1719809312004.pngRakesh1705_4-1719809327919.png

 

Created mesures for Actual and Target

 

Rakesh1705_5-1719809370972.png

 

Rakesh1705_7-1719809502991.png

 

Final output with target in line and actual in column and x axis (date) formatted in Categorical.

Hi Rakesh1705, thanks, I followed your screenshots and created the measures but I still can't seem to get the "actual" values (bars) on my chart, including formatting as Categorical. Any ideas?

onedayover
Helper III
Helper III

Hi Irwan, thanks for getting back to me. I applied your DAX to my real data and I get the line for the "target" values but no bar for the "actual" values. I have set the x and y axis as per your screenshot. Any ideas what might be wrong? And sorry, the data I provided for "actual_2024" attributes were a copy and paste and I forgot to change these figures to something different.

Irwan
Solution Sage
Solution Sage

Hello @onedayover 

 

please check if this can accomodate your need.

Irwan_0-1719807610068.png

 

Target = CALCULATE(SUM('Table'[value]),CONTAINSSTRING('Table'[attribute],"target"))
Actual = CALCULATE(SUM('Table'[value]),CONTAINSSTRING('Table'[attribute],"actual"))
 
Seems your value column doesnt have any sum value (those categories only have one value, ie: actual_2024 only have one value).
 
Please check this DAX to your real data.

Hope this will help you.
Thank you.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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