Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I have created a very simle line chart with time on the x horizontal axis and quatity on the y vertical axis. I have three data sets showing three separate lines - how do I get a slicer to operate on the three data lines ie able to select which or how many lines are shown? Any help appreciated.
Solved! Go to Solution.
Hi @Anonymous ,
You measures for each column should be something like this:
Measure G = IF ( CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure G" ); SUM ( Table1[G] ); BLANK () ) Measure M = IF ( CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure M" ); SUM ( Table1[M] ); BLANK () )
Then add this measures to your chart and the slicer based on the measure selection table.
See attach PBIX file.
Regards,
Mfelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsRegards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Check this video that contains a description how to have turn off and on slicer for measures in a chart.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsStill no luck, followed video to the letter and still only get the table and slicer to work in harmony - the chart remains unaffected my slicer selections.
Hi @Anonymous ,
Can you share a sample of your file please?
If the information is sensitive please shared it trough private message.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi, thganks for you interest - what is the best way to send/share my files?
Hi @Anonymous ,
Send a web link for onedrive, google drive, we transfer or similar.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
Very basic data set, I then created 2 new measures to copy the initial data and allow the CONTAINS amendment to be made. I set up the xTable as instructed but only the slicer (xTable) and the table visualisation are changed when using the slicer.
Hi @Anonymous ,
This is pointing to a closed sharepoint group (probably from your company) don't have access to the file.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
Hopefully through GDrive this will now work.
Stuart
Hi @Anonymous ,
You measures for each column should be something like this:
Measure G = IF ( CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure G" ); SUM ( Table1[G] ); BLANK () ) Measure M = IF ( CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure M" ); SUM ( Table1[M] ); BLANK () )
Then add this measures to your chart and the slicer based on the measure selection table.
See attach PBIX file.
Regards,
Mfelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI need to wait until tomorrow to get the latest version of Power BI downloaded by my IT department so cannot open you file (yet). can you expalin why the sum function, this just flat lined my graph. I added you measures in but still the slicer does not work, do I need to apply the measure to the selection table(s) as well?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi MFelix,
Dowloaded your fileand have amended your scripts to make the visualisations work. My only concern from an understanding perspective, is why the Sum function is needed in the 'TRUE' statement for the CONTAINS function? When I added this in I got (what I expected) which was a sum of the table columns so a flat line.
I also had set up new columns rather than measures which I think had somethin to do with it. Anyway, heartfelt thanks for your tim and patience with my query you are a star.
Hi @Anonymous ,
The values that I provided was for Measures not columns, the SUM is not part of the TRUE is the result of the IF function when the CONTAINS is TRUE.
You can use the SUM functionor reference it to another measure depends on the results you want. Looking at the measure I provided:
Measure G = IF ( CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure G" ); // Check if the Measure G is selected on the slicer SUM ( Table1[G] ); // Returns the sum of Column G if Measure G is selected on the slicer BLANK () // Returns blank if Measure G is not selected on the slicer )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe video was excellent as a new starter to Power BI. I have not yet got the solution to work with my datasets so will try again today. I create the tables but the line graph refuses to follow the slicer selections.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |