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
rumittal
Employee
Employee

Two charts created of same table not slicing each other plus question about creating custom axis

Hi All,

 

My intention is to divide certain set of values - 'VALUES' in different categories/priorities value-wise for my entities - 'TESTS' and display in another bar chart, such that both charts can slice each other.

 

Approach --> I created three measures that would calculate the number of TESTS with specific value range and added them to a clustered bar chart (details below)

 

Issues :

(1) How to get the Axis displaying tha categories, like (<0.90) , (>=0.90 and <0.98) and (>0.98) for VISUAL B[Reference:visualC]

This is how I created measures to divide VALUES and added them to Visual B .This is how I created measures to divide VALUES and added them to Visual B .

(2) My Visual B - showing percentage of items cateogry-wise doesnt slice  Visual A - which is the set of values being categoriesed , when I click on it ? (I have edited their interactions to do so and all the vlaues are from same table)

 

Visuals : 


Visual A : VALUES for TESTSVisual A : VALUES for TESTS

Visual  B : Categories/Priorities  - P1, P2 , P3 calculated as measures and plotted to clustered chartVisual B : Categories/Priorities - P1, P2 , P3 calculated as measures and plotted to clustered chart

Visual C :Highlighted is the axis I would like to have in Visual BVisual C :Highlighted is the axis I would like to have in Visual B

 

 

 

6 REPLIES 6
mauriciosotero
Resolver III
Resolver III

Hi,

 

Sorry for my anwser. I think now I got it. Try this:

 

First, create a column in the table test:

PriorityGroup = SWITCH(TRUE(),TESTS[Value]<.9, "Group < 0.9",TESTS[Value]<0.98,"Group > 0.90 and < 0.98","Group >= 0.98")

Then , create this two measures:

TotalTests = CALCULATE(COUNT(TESTS[IDTest]),ALL(TESTS))

PriorityGroupTotal% = DIVIDE(COUNT(TESTS[PriorityGroup]),[TotalTests])

So,

You can create your clustered  chart using the measure PriorityGroup as the Axis and PriorityGroupTotal% as the Value:

 

Capture2.PNG

 

@mauriciosotero, Thanks for the help! This seems to be working, however Tests can have multiple entries in the table , thus even PriorityGroup for a paritcular tests will have multiple duplicate instances.

 

How can I ensure that I count only the values for a particular Test single time ? When calcualting below measure: 

PriorityGroupTotal% = DIVIDE(COUNT(OverallAndPerCP[Priority]),[TotalTest])

Hi, welcome!

 

Can you share a sample of the table Tests? Because I can't understand why Tests can have multiple entries and a test has more than one PriorityGroup.

 

Thanks

@mauriciosotero, That is because other than "TESTS[Value]" , there is another column "TESTS[Value2]" which has unique numbers for each row, but TESTS[Value]could be duplicated for some rows of unique TESTS[Value2].

 

I tried below DAX but it doesn't seem to be working, 

 

PriValues = DIVIDE (
CALCULATE( DISTINCTCOUNT( TESTS[IDTest])),
CALCULATE ( DISTINCTCOUNT( TESTS[IDTest]), ALL ( Table[Tests]))
)

But when I plot it on bar graph, with PriorityGroupTotal% on X-axis, it always slices the data, even though I use ALL.

mauriciosotero
Resolver III
Resolver III

Hi @rumittal ,

 

You can apply different filters criteria to the charts. For this, you can use the Visual Filters properties clicking in the charts and add the fields you want to use:

 

Capture3.PNG

 

Then, you have to edit the interations beetween the slicer and the chart to configuring the indepent aproach:

 

Capture2.PNG

 

If this helps, pls give me a kudo and mark as the solution. Thanks

 

 

 

 

@mauriciosotero, I am sorry but I couldnt understand how below suggestions could address my issues. please illustrate further, below are my issues (Visuals can be found in original message).

 

For issue 1 , I have already created measures to get the categories/priorities percentage , and added them to vertical bar chart , I need suggestion on how can I add Category strings like "(<=0.90)" to Y-axis , like shown in visual C.

 

For issue 2, I have already edited itneraction between my bar chart (visual B) and item's chart (Visual A) , but still when I click on any bar from Visual B, say (<=0.90) , visual A does not filter out to show only scenarios having consistency < 0.90.

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.