Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi Happy Friday Eve Everyone!
I am very new to Power BI and have searched for hours to figure out my issue.
My data includes customer name and transactional revenue. I added a rank column:
Calculated columns are only calculated during data refresh, so they do not pay any attention to slicers or filters you may have in a report. If you want something to react dynamically you will need a measure.
You could create a measure like
Filtered Rank Shipping Global Customer Measure =
VAR CustomerName =
SELECTEDVALUE ( 'DW RevenueData'[Shipping Global Customer] )
VAR CustomerRank =
SELECTEDVALUE ( 'DW RevenueData'[Rank] )
VAR Result =
IF (
OR (
CustomerRank > 'Filtered Rank'[Filtered Rank Value],
LEFT ( CustomerName, 11 ) = "No Customer"
),
"Others",
CustomerName
)
RETURN
Result
but you will need to put in the visual a column from the revenue table that uniquely identifies a row.
I brought in some co-workers to help me and we are having a problem when trying to show the data. So previous I had Rank now it is called Rank Column.
Using your suggestion:
Filtered Rank Shipping Global Customer Measure =
VAR CustomerName =
SELECTEDVALUE ( 'DW RevenueData'[Shipping Global Customer] )
VAR CustomerRank =
SELECTEDVALUE ( 'DW RevenueData'[Rank Column] )
VAR Result =
IF (
OR (
CustomerRank > 'Filtered Rank'[Filtered Rank Value],
LEFT ( CustomerName, 11 ) = "No Customer"
),
"Others",
CustomerName
)
RETURN
Result
Both with thier measures and the one you gave me, this happens:
We are switching from Tableau to Power BI. This is what I am looking to ceate:
I am getting closer when I make a small change to your suggestion to use Top N Customer instead of their name.
Filtered Rank Shipping Global Customer Measure =
VAR CustomerName =
SELECTEDVALUE ( 'DW RevenueData'[Shipping Global Customer] )
VAR CustomerRank =
SELECTEDVALUE ( 'DW RevenueData'[Rank Column] )
VAR Result =
IF (
OR (
CustomerRank > 'Filtered Rank'[Filtered Rank Value],
LEFT ( CustomerName, 11 ) = "No Customer"
),
"Others",
"Top "&'Filtered Rank'[Filtered Rank Value]&" Customers"
)
RETURN
Result
Now the issue is I can't move this to a row like my Tableau report:
Is this because it is a measure? Any ideas how to fix this?
You could try putting the actual customer name on the rows of a matrix and put this measure as the first value. Then set the width of the customer name to 0. You may need to turn off word wrap for that column.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
66 | |
66 | |
50 | |
31 |
User | Count |
---|---|
112 | |
95 | |
75 | |
63 | |
40 |