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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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