- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Having issue with one of the DAX calculation that I am writing, Dax is somehow filtering categories
Hi @members @PowerBI Everyone,
I am new to Powerbi and having some issue that I am trying to fix. Any help will be appreciated
I have data columns such as strata_val, products,units, statelookup. wherein both state and zip level information are existing under the strata_val.
I am writing a dax to removefilter on slicer selection (populating using strata_val(zip)) and using the statelook to create a stratified state level information.
Challenge is that, its filtering the categories on basis on whatever is exisiting only in the zip level. So, if state level has 4 categories, and zip has only 3 categories information, then using dax the chart is returning only 3 category specific information, while i want it to return all the 4 categories
Snapshot
Sample data
country | strata_val | Product | Units | LookupState |
US | WA | A | 1 | |
US | WA | B | 2 | |
US | WA | C | 3 | |
US | WA | D | 4 | |
US | 980 | A | 1 | WA |
US | 980 | B | 2 | WA |
US | 980 | C | 3 | WA |
US | 980 | D | 3 | WA |
US | 981 | D | 1 | WA |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c ,
Please follow below steps, please see below pbix as reference
https://drive.google.com/file/d/1L9nKV8y02zltW5SJ6oHMn2pfEbQ9dWbP/view?usp=drive_link
1. create diconnected table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c ,
please follow below steps , please see below file for your reference
https://drive.google.com/file/d/12krVWc2G0SinknBrGKyCLhMUgGUuHT94/view?usp=drive_link
1. disable the interacion between chart and slicer uisng Format->Edit interaction
2. use this measure in chart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @powerbiexpert22 ,
I tried the solution, it seems to be working for one state code, but if i add up mutliple states then it seems to be breaking and getting only 1 set of static chart.
Please find the updated pbix file attached herein for your reference.
https://drive.google.com/file/d/1LpRjZGW-a2glLvLfQKZ_mFrIKHQvbOxz/view?usp=sharing
Do, I need to make any changes to make it work in case of multiple states.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c ,
you will have to use "var Measure_test_newone" instead of uisng Max(units) in the chart, please see below updated version of pbix
https://drive.google.com/file/d/1OghvvH-Z84Jr2sHmGA_eaZPnfFlfJBha/view?usp=drive_link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hI @powerbiexpert22 ,
I tried the solution, it doesnot seems to be working fine. My expectation is when i select a slicer corresponding to CA it should show bar for CA related data below , if WA then WA specific information. there are 2 zip codes for both in the file with variation but its only picking the products that are in the zip level(i think)
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c ,
Please follow below steps, please see below pbix as reference
https://drive.google.com/file/d/1L9nKV8y02zltW5SJ6oHMn2pfEbQ9dWbP/view?usp=drive_link
1. create diconnected table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c ,
this issue is happening because there are no entries in Lookupstate column as highlighted below, please share the sample pbix file if possible ( you can share fie via google drive or dropbix)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @powerbiexpert22 ,
Please find the link to pbix file - https://drive.google.com/file/d/1Et7s9Qw9t4Ge3moVGyCS-8cmcewuXqDu/view?usp=drive_link.
Please feel free to let me know in case of any access issues.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @n_c
Please try this DAX:
Measure =
CALCULATE(
SUM('Table'[Units]),
REMOVEFILTERS('Table'[strata_val]),
'Table'[LookupState] = SELECTEDVALUE('Table'[LookupState])
)
+ 0
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"
Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
09-12-2024 12:22 PM | |||
08-27-2024 12:43 AM | |||
08-01-2024 09:31 PM | |||
07-26-2023 08:56 AM | |||
03-18-2024 08:45 AM |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
12 |