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.
I have a Fact table showing transactions, which includes a vendor number key. It is joined to a dimension table with all Vendor names.
We use this to show market share by aggregating all revenue by vendor name with a % of Grand Total. This works fine for internal use where we want to see all vendor names listed.
When we discuss with vendors, however, we want to show them where they rank in market share, but we do NOT want to show the names of other vendors.
What I am trying to do is be able to select a vendor, then have the market share table show the name of the selected vendor, but have all of the other vendors show an unidentifiable alias (I can add an alias column in the vendor table).
It would look like the follwing:
With No Vendor Selected
Vendor | Revenue | % of GT |
Chevrolet | $1,250,000 | 62.5 |
Ford | $500,000 | 25.0 |
Toyota | $250,000 | 12.5 |
With Ford Selected as Vendor
Vendor | Revenue | % of GT |
ALIAS-1 | $1,250,000 | 62.5 |
Ford | $500,000 | 25.0 |
ALIAS-2 | $250,000 | 12.5 |
Obviously, if I select Chevrolet instead of Ford, I'd like it to show an alias for Ford and display Chevrolet.
I'm kind of stumped on how to pull this off. Any help is appreciated!
Hi @SMBM ,
Below is my test data:
You can create a new table:
Table 2 = VALUES('Table'[Vendor])
The following DAX might work for you:
Measure = IF(ISFILTERED('Table 2'[Vendor]) , IF(SELECTEDVALUE('Table'[Vendor]) = SELECTEDVALUE('Table 2'[Vendor]) , SELECTEDVALUE('Table 2'[Vendor]) , SELECTEDVALUE('Table'[Name])) , SELECTEDVALUE('Table'[Vendor]))
The final output will like this:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
This seems to work just as requested! I do have a use case where I may select multiple vendors which doesn't quite seem to work with this measure. I'm trying to work out what tweaks would allow it to support multiple selections, but if you have any suggestions, I'd be grateful to hear them.
Thank you for this. I'm going to try to implement this today and will report back on how it works! I appreciate you taking the time.
User | Count |
---|---|
89 | |
82 | |
53 | |
40 | |
35 |