Forum Discussion

sebastronio09's avatar
sebastronio09
Frequent Visitor
3 years ago

Display a measure correctly

Hello,im new to power bi, i have a measure that uses selected value to display a measure by the area selected so that i can dynamically select the column and filter the bar charts below like in the following image , the problem is it dosent show all the columns i want to be selected and if i use the other table it dosent filter the bar charts below: 

 

 

The first table is with "Measure by area" and the second one is putting the measures one by one, you can see it dosent have all the Areas the second one does, but with some part numbers it does show the correct areas and with other dosent


This is the measure:

 

Measure by area =


 

VAR area = SELECTEDVALUE('Scrap Data'[Areas])


 

RETURN


 

SWITCH(

    area,

    "Area 1", [Measure 1],

    "Area 2", [Measure 2],

    "Area 3", [Measure 3],

    "Area 4", [Measure 4],

    "Area 5", [Measure 5],

    "Area 6", [Measure 6],

    "Area 7",[Measure 7],

    "Area 8",[Measure 8],

    "Area 9",[Measure 9],

    BLANK()

)
I have a model with a main table model with general product numbers, and i have models for area 1, area 2, area 3, and so on with its unique product number values, the main table model helps filter each model with only the ones in the main table, each area is conected by a scrap list model that has all the scrap of each area.

How can i make the measure display all the areas or make the other table filter the below charts and best practices, thanks.

No RepliesBe the first to reply