Data_Analyst
Data_Analyst

Reputation: 81

In filter pane the dim table fields have a 1 next to it instead of a count of rows in equiv fact table

Using Power BI and the table visual and needing to show fields from both the fact and dimension tables. When I add my fields to the table visual they shpw fine but the dimension fields in the filter pane have a 1 next to each value instead of the count of rows in the equivalent fact table. If i import a fact table with left joins then it shows the right count of values does anyone have a way how to best show columns from dim/fact tables in a table visual.

p.s I don't see the point in a star schema when there is these kind of problems appearing.

Sample Data

Sales Table

sales_id    sales    sales_person    date_sold    product_id
1            5000      john          10/01/2022       1
2            7000      john          10/01/2022       2
3            5000      bill          10/01/2022       1
4            7000      bill          11/01/2022       2
5            5000      john          11/02/2022       1

product table

product_id    product          category_id
1             kitchen units       kitchen
2             floor tiles        flooring

expected/desired output

table visual

sales_id      sales     sales_person     date_sold      product
 1            5000         john          10/01/2022     kitchen units
 2            7000         john          10/01/2022     floor tiles
 3            5000         bill          10/01/2022     kitchen units
 4            7000         bill          11/01/2022     floor tiles
 5            5000         john          11/02/2022     kitchen units

click on table visual then view filter pane

example of two fields

sales_person
john             3
bill             2

product
kitchen units    1
floor tiling     1

Why does the above product field show only a one? I understand its because its a dim field but would prefer to see

product

kitchen units     3
floor tiles       2

An example in relation to my question:

enter image description here

Upvotes: 1

Views: 32

Answers (1)

W_O_L_F
W_O_L_F

Reputation: 1486

Also new to power bi. But maybe you could get the name from Product and count from Sales. enter image description here

enter image description here

For this to work you need table relation: enter image description here

Upvotes: 1

Related Questions