Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All
I need to add filter at AMT_REVENUE_C
So that it only plot 2 company sales line.
( I aware that i can using Bookmark to filter these 2 company , But due to some reasons , i need to hard code the )
My PBI file :-
https://www.dropbox.com/s/j7g53rpz32s2btw/COMPETITOR_V006.pbix?dl=0
Solved! Go to Solution.
Hi @Paulyeo11
Click on Apply filter
Before
After
Phil
Proud to be a Super User!
Hi @Paulyeo11
Click on Apply filter
Before
After
Phil
Proud to be a Super User!
Hi Phil
Thank you very much. it work now
Hi @Paulyeo11
Here's your PBIX with the filter working.
With the visual selected, I dragged the Measure to the Filters area then set it to Show items when the value is 1.
I then added a few more companies to the list in the Measure so the visual is now showing this
Just add more companies to the list in the Measure to see them displayed.
Regards
Phil
Proud to be a Super User!
Hi Phil
Thank you very much.
I try to duplicate what and how to make it work , i still can not get it right .
Hi @Paulyeo11 ,
Do you want to show ten COMPETITOR without slicer?
If yes, you can create a measure, then put it in Filter on this visual and configure it as 1.
Measure =
IF(
MAX(COMPETITOR[COMPETITOR]) in {"OMRON","PHOENIX"},1,0)
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi Zhen
I have download the PBI file and can see it work fine.
But i cannot duplicate in my actual PBI file , the issue i face is i am unable to move the measure into the filter box.
Paul
Hi @Paulyeo11 ,
You need to select the line chart and add the measure in Filter on this visual.
Or you can put it in Tooltips, and configure it in Filter pane.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Zhen
I manage to drag the Measure to filter box , But I am still unable to make it work.
Below is my PBI file :-
Paul
HI @Paulyeo11
I thught you only needed to plot data for 2 companies, not many expressions?
The original measure didn'twork, I think perhaps Fowmy thought that AMT REVENUE_C was another measure but the code provided did notwork and requires the column AMT REVENUW_C to br aggregated in some way hence using SUM and yes this will produce a single line. Which is why I created 2 separate measures for the 2 companies you said you wanted.
Regards
Phil
Proud to be a Super User!
Hi Phil
Thank you for your sharing.
May i know i need to create 10 seperate expression , if i need to plot 10 company line chart ? there is no way that i can create just one expression and insert those 10 company name in the expression ?
Paul
Hi @Paulyeo11
There are a few typos with that measure. The word Table is reserved so if you have a table callled Table is has to be in single quotes when you refer to it in measures. There's also an extra = in there that shouldn't be. You also need to specify what aggregation to use on the AMT REVENUE_C column so you end up with this
AMT = CALCULATE ( SUM([AMT REVENUE_C]), FILTER(ALLSELECTED('TABLE'[COMPETITOR]) , 'TABLE'[COMPETITOR]="OMRON" || 'TABLE'[COMPETITOR]="PRECICON"))
But I'm not sure that is what you are actually after? I'm not clear but you could create 2 measures
AMT Omron = CALCULATE ( MAX([AMT REVENUE_C]), FILTER(ALLSELECTED('TABLE'[COMPETITOR]) , 'TABLE'[COMPETITOR]="OMRON"))
AMT Precicon = CALCULATE ( MAX([AMT REVENUE_C]), FILTER(ALLSELECTED('TABLE'[COMPETITOR]) , 'TABLE'[COMPETITOR]="PRECICON"))
and plot these to get
But maybe I'm misunderstanding what you want?
Please check this PBIX file for the above DAX and visual
Regards
Phil
Proud to be a Super User!
Hi Phil
Thank you very much for sharing.
I just notice you have create below expression , but it only plot one line. what i need is it should plot 2 line.
AMT = CALCULATE ( SUM([AMT REVENUE_C]), FILTER(ALLSELECTED('TABLE'[COMPETITOR]) , 'TABLE'[COMPETITOR]="OMRON" || 'TABLE'[COMPETITOR]="PRECICON"))
No worries @Paulyeo11 Your initial image showed the slicer with 2 companies highlighted and asked how to select data for those 2 specific companies.
Proud to be a Super User!
@Paulyeo11
Try this measure:
CALCULATE ( [AMT_REVENUE_C], FILTER( ALLSELECTED(TABLE[COMPETITOR]) = TABLE[COMPETITOR]="PRECICON" || TABLE[COMPETITOR]="OMRON"))
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi Fowmy
Thank you for your help.
I get error msg :-
https://www.dropbox.com/s/j7g53rpz32s2btw/COMPETITOR_V006.pbix?dl=0
Above link is my PBI file
Paul
Hi @Paulyeo11
Use CTRL+Mouse Click to multi-select the filters
Or turn off Multi Select with CTRL in the Format area of the Slicer to allow you to just click what Competitors you want displayed
Phil
Proud to be a Super User!
Hi Phil
Thank you very much for sharing the tips and trick. But for my actual application , i have more then 50 company , so i need hard code . which is what Fowmy advise me.
Paul
User | Count |
---|---|
77 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
102 | |
93 | |
83 | |
64 |