Forum Discussion
Show only selected Company value
Hi Team,
if i select INR need to show only need to show 00030
if i select usd need to show other.
Hi rajasekaro , Thank you for reaching out to the Microsoft Community Forum.
Please try:
Currency Rule :=VAR curr =
SELECTEDVALUE ( 'Currency selection'[Currency] )
VAR comp =
SELECTEDVALUE ( 'COMPANYMASTER'[COMPANYMASTERID] )
RETURN
SWITCH (
TRUE(),
curr = "INR" && comp = "00030", [Final Amount],
curr = "USD" && comp <> "00030", [Final Amount],
BLANK()
)
If it didn’t give expected output, please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Include all the necessary details, detailing your scenario and issue as clearly and fully as possible.
Do not include sensitive information. Do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
7 Replies
- johnbasha33Super User
Hi rajasekaro
Since Company is on Columns, visual-level filtering alone is NOT enough.
You must control the measure value returned per company.Step 1: Base measure (example)
Assume you already have something like:
Amount :=
SUM ( 'Fact'[Amount] )
Step 2: Currency-based visibility measure
Create a new measure:
Amount (Currency Rule) :=
VAR curr = SELECTEDVALUE ( 'Currency'[Currency] )
VAR comp = SELECTEDVALUE ( 'Company'[Company] )
RETURN
SWITCH(
TRUE(),
-- INR → only company 00030
curr = "INR" && comp = "00030",
[Amount],
-- USD → all except 00030
curr = "USD" && comp <> "00030",
[Amount],
-- hide everything else
BLANK()
)
Step 3: Use this measure in the Matrix
- Replace Amount with Amount (Currency Rule) in Values
- Matrix settings:
- Format → Values → Show items with no data = OFF
- Format → Columns → Stepped layout = OFF (optional, cleaner)
Result
Currency
Visible Company Columns
INR
00030 only
USD
00000, 00020, 00040, 00050 (00030 hidden)
Power BI automatically removes matrix columns that return only BLANK().
Important Notes
- Currency slicer must be single-select (radio button = perfect)
- Company slicer can stay All
- This works even with Totals and hierarchies
Optional: Keep Total Correct
If your Total is wrong (common issue), use:
Amount (Currency Rule) :=
VAR curr = SELECTEDVALUE ( 'Currency'[Currency] )
RETURN
SUMX(
VALUES ( 'Company'[Company] ),
VAR comp = 'Company'[Company]
RETURN
SWITCH(
TRUE(),
curr = "INR" && comp = "00030", [Amount],
curr = "USD" && comp <> "00030", [Amount],
BLANK()
)
)
If you want:
- Company slicer to auto-change
- Currency coming from fact rows
- RLS version
- Performance-optimized version for large data
tell me which one and I’ll tailor it.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
- rajasekaroHelper III
I have create A measure
(Currency Rule) =
VAR curr =
SELECTEDVALUE ( 'Currency selection'[Currency] )
VAR comp =
SELECTEDVALUE ( 'COMPANYMASTER'[COMPANYMASTERID] )
RETURN
SWITCH (
TRUE(),
-- INR → only company 00030
curr = "INR" && comp = "00030",
[Final Amount ],
-- USD → all except 00030
curr = "USD" && comp <> "00030",
[Final Amount ],
-- show 0 for all other cases
0
)
its also showing all column- v-hashadapuCommunity Support
Hi rajasekaro , Thank you for reaching out to the Microsoft Community Forum.
Please try:
Currency Rule :=VAR curr =
SELECTEDVALUE ( 'Currency selection'[Currency] )
VAR comp =
SELECTEDVALUE ( 'COMPANYMASTER'[COMPANYMASTERID] )
RETURN
SWITCH (
TRUE(),
curr = "INR" && comp = "00030", [Final Amount],
curr = "USD" && comp <> "00030", [Final Amount],
BLANK()
)
If it didn’t give expected output, please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Include all the necessary details, detailing your scenario and issue as clearly and fully as possible.
Do not include sensitive information. Do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
- Ashish_MathurSuper User
Hi,
Not sure how much i can help but i'd like to try. Share the download link of the file/dummy file and show the problem there clearly.
- ryan_mayuSuper User
maybe you can try to add the currency column in description table.
If (description = 00030 , "INR',USD")
then link this column to the currency slicer table.
Then the slicer will affect the columns.
if this does not work, pls provide some sample data and expected output.
- v-hashadapuCommunity Support
Hi rajasekaro , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
- v-ssriganeshCommunity Support
Hello rajasekaro,
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.