Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I'm trying to product a table chart like this where I show each station, the total sales for the station and the top selling product and top vehicle customer for that station. However my current code shows a table where the sales is calculated correctly but the top product and top vehicle is wrong. Im guessing it's not calculating the top product and vehicle per row but across all stations since it's showing the same values for each row.
The fields used in the table come from different table sources since I'm following the star schema. Transactions is the fact table while the rest are dimension tables
For example, i'd get the Station Name from the Stations table while Total Sales form the Transactions table.
My current code for identifying the Top Product is
TopProduct = FIRSTNONBLANK(
TOPN(
1, VALUES(
'Vehicles'[VehicleName]
)
),
SUM('Transactions'[SalesAmount])
)
Would really appreciate help on how to get the correct Top Vehicle and Product. Thank you!
Thank you for this, but it unfortunately doesn't solve my issue
User | Count |
---|---|
76 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |