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 community,
I'm doing some testing on a simple model: 1 fact table (Sales) connected to a dimension table (Products) and a calendar
I have 2 visuals: 1 card and 1 column chart
2 filters: Year and quarters
1 tree map for selecting 'Product category' which I'm using as a filter to highlight a sub-category 'Product type' on column chart
1 measure "Visuals titles" for both visuals' to create dynamic titles:
Visuals titles =
VAR AllProducts =
IF (
ISBLANK ( SELECTEDVALUE ( 'Calendar'[Quarter/Year] ) ),
"All products, " & SELECTEDVALUE ( 'Calendar'[Year] ),
"All products, " & SELECTEDVALUE ( 'Calendar'[Quarter/Year] )
)
VAR SingleProduct =
IF (
ISBLANK ( SELECTEDVALUE ( 'Calendar'[Quarter/Year] ) ),
SELECTEDVALUE ( Products[Product category] ) & ", "
& SELECTEDVALUE ( 'Calendar'[Year] ),
SELECTEDVALUE ( Products[Product category] ) & ", "
& SELECTEDVALUE ( 'Calendar'[Quarter/Year] )
)
RETURN
IF (
ISBLANK ( SELECTEDVALUE ( Products[Product category] ) ),
AllProducts,
SingleProduct
)
If no product is selected, then both visuals' titles behave correctly
But if I select a product category (for example Firmware),then only the card is displaying the correct title but not the column chart:
The column chart still displaying 'All products' instead of 'Firmware' and don't understand why that is.
Besides if instead of a treemap I use a filter instead for 'Product category' then it works but I'd like to keep a treemap as I'd like the chart to be highlighted and not filtered.
Can you help?
Thank you!
Sax
The treemap isn't filtering the column chart, its cross highlighting it, which means that no filters are passed into your measure. I don't think that there is a way to detect whether or not cross highlighting is in effect.
You could use Edit Interactions to make the treemap filter the column chart instead of cross highlighting, that should work.
Hi, thanks. I know that filtering would work but it's something that I wanted to avoid.
But conceptually, I still don't understand, why is the treemap working for the card and not for column chart?
Thanks
In the card the value from the treemap is being as a filter, so SELECTEDVALUE will return a single value. Because the column chart is not being filtered then SELECTEDVALUE will return blank, as multiple values are visible, so your measure will return the value for all products.
Thanks...what you just said is still sinking in due to my limited knowledge of functions.
I guess another more creative way is to deselect the column chart's title and overlay the card's title instead...
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 | |
74 | |
65 | |
51 | |
30 |
User | Count |
---|---|
115 | |
109 | |
71 | |
65 | |
39 |