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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Create Line Chart for TOP1 Category.. using RANKX

Hello,

 

DATA SOURCE
SQL Server Analysis Services database – SSAS Cube

 

_/

 

Visual Definitions / Interactions

  • Bar Chart 
    • Rows -                  FactScrapNCMR.[Defect Type]
    • Column -             DimCalendar.[Cal Year]
    • Values-                 [Reject Count]                                  <- This measure was created within SSAS
  • Line Chart
    • X-Axis                  DimCalendar.[Week Begin]
    • Y-Axis                   Defect %                                            <- This measure was created within SSAS

_/_/

 

 

This is the initial state
Initial StateInitial StateWhen a Defect highlighted .  line is altered - This is the goal - ultimately create  chart for each Defect [Top 1-3]

Selects 1st / Top Defect .. Chart is alteredSelects 1st / Top Defect .. Chart is alteredExample of Rankx per each Defect
Rankx per Defect TypeRankx per Defect Type

_/_/_/

 

This is the direction I am Thinking....

 

1-Create BI Calculated Table.. with Rankx ( as above )

 

2-Use a “LOOKUP” - that returns Defect

-- Example Type for Rank Test  = 1

 

3-Within CALCULATE something like….

line for chip = CALCULATE(

 [Defect %],

'Fact Scrap NonConformance Summary'[Disposition] = "Rework",

'Fact Scrap NonConformance Summary'[Defect Type] = "Chip"

 replace “Chip” with lookup of [Defect Type] on rankx = 1 

Rankx evaluated ‘Stain – White’ as '1'

 

_/_/_/

 

Regards.. FAB

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Can you provide a simple PBIX file for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.