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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Line and Stacked column chart issue with Measure slicer(slicer created using measures)

Hi All,

         I have created a line and stacked column chart as below usnig these measures. [AMS Spend] and [AMS sales] are also measures. I have created this measure to use it in the slicer. I have created a new table(Slicer_AMS-AMG) with column name MetricPickerName. I have used this table to create this measures.

AMS_MetricPicker1 =
SWITCH(TRUE(),
SELECTEDVALUE('Slicer_AMS-AMG'[MetricPickerName])= "AMS Spend",[AMS Spend],
SELECTEDVALUE('Slicer_AMS-AMG'[MetricPickerName])= "AMS Sales",[AMS Sales],
BLANK()
)
 
AMS_MetricPicker2 =
SWITCH(TRUE(),
SELECTEDVALUE('Slicer_AMS-AMG'[MetricPickerName])= "AMS CPC",[AMS CPC],
SELECTEDVALUE('Slicer_AMS-AMG'[MetricPickerName])= "AMS ROAS",[AMS ROAS (HALO)],
BLANK()
)
 
dragged the AMS_MetricPicker1 to column values and AMS_MetricPicker2 to column values. Added the MetricPickerName to column series. AMS_MetricPicker1 is working good as i have added MetricPickerName to the column series. But for Line values there is no line series thats why i am not able to get the line values in the chart. Is there any way to show the line values also,please suggest me Thanks in advance.4.PNG
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Create measure like below measure for all the measures you need to show in the graph individually. It will work for Matrix visual also. For me its worked.
AMG Clicks_M =
VAR LogicAM =
CountRows(Distinct(
    Filter(
        AllSelected(Slicer_AMGMetricPicker[AMGMetricPIckerName]),
        Slicer_AMGMetricPicker[AMGMetricPIckerName] ="Clicks"
    )
))=1
Return
If(
    LogicAM,
    [AMG Clicks],
    Blank()
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Please try the below 2 methods and check if they can get your expected result:

1. Right-click the field "WeekNo" and select Show items with no data to enable it

2. Use the custom visual "Line and Stacked Column Chart with Table"

Line and Stacked column chart issue with Measure slicer.JPG

Best Regards

Rena

Anonymous
Not applicable

Create measure like below measure for all the measures you need to show in the graph individually. It will work for Matrix visual also. For me its worked.
AMG Clicks_M =
VAR LogicAM =
CountRows(Distinct(
    Filter(
        AllSelected(Slicer_AMGMetricPicker[AMGMetricPIckerName]),
        Slicer_AMGMetricPicker[AMGMetricPIckerName] ="Clicks"
    )
))=1
Return
If(
    LogicAM,
    [AMG Clicks],
    Blank()
)
amitchandak
Super User
Super User

@Anonymous , difficult to say looking at the formula, why it is not working

check this example

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern

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  I have gone through the example that you have provided. Same thing what ever done in that example i need to do in line and stacked column chart.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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