Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
jmkvalsund
Helper II
Helper II

Slicing two visuals uses values from one of them

I have three tables:

  • "Customers" containing customerID and name etc.
  • "LongTermDeals" (Ltd) containing long term deals with numerous records for each deal, typically data added every day with new dateid
  • "ShortTermDeals" (Std) containg running deals, without history, only current value for each deal.
  • Both std and ltd containing customerID and related by a one-to-many from CustomerID 

Putting both in table-visuals and adding customerID from Customers, I can click on a customer in either of them and get the same customers record in the other. Fine!

 

But; I want to add a slicer based on the values inLtd, and then "slice " the actual customers in both tables, not only in Ltd as I do by now. How can I relate Ltd to Std (and the opposite) to use slicer values from both tables to get the common customers?

 

1 ACCEPTED SOLUTION

In that case I would probably look to Power Query rather than DAX. Reference the query which pulls std, remove the columns you're not interested in and then remove duplicates. do the same for ltd and merge the 2 queries. you will then be able to link that new table to both std and ltd

View solution in original post

5 REPLIES 5
johnt75
Super User
Super User

you could create a new dimension table, something like

All values =
DISTINCT (
    UNION (
        ALLNOBLANKROW ( 'long term deals'[values] ),
        ALLNOBLANKROW ( 'short term deals'[values] )
    )
)

and then link that to both tables and use it in slicers and visuals.

Thanks, that works in the case where I slice on the values of the deals.

Then on Std I also want to slice on the product name, (so that selecting a product in Std also shows the Ltd's for the customers having both), how do I create the dimension table in that case? It will need two columns, value and productname, where productname is filled with NULL's from Ltd but I don't see how I can create that table using ALLNOBLANKROW..

In that case I would probably look to Power Query rather than DAX. Reference the query which pulls std, remove the columns you're not interested in and then remove duplicates. do the same for ltd and merge the 2 queries. you will then be able to link that new table to both std and ltd

johnt75
Super User
Super User

Create a slicer from the Customers table and add a filter to it such that the customer ID from Ltd is not blank.

Ok, bad explaining from my side, I want to slice based on the values of the deals, not on the customerID's. And when slicing on the values of the Ltd's, I want the Std's to be sliced as well.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.