Forum Discussion
Table or Matrix Visual with Subcategory Only Applying to One Main Category
- 2 years ago
Hello,
I have devised two solutions both of them aren't perfectly what I want but they both serve the purpose and I hope this can help others. There are two approaches:
1. Drill Through2. Customizing the calculation
In the first method I simply placed a drill through button and a drill through page that only expanded on the city for local sales. I also limited the drill through button to only work if "Local" was chosen on the table and if nothing or anything else was chosen the button would be disabledThe second option is to alter my calculation and add a SELECTEDVALUE(City_D[City Name]) and if that appears blank then the calculation will also result in a blank value (embedded in my switch statement)
Either of these option gets me to present the data I want to but in two different ways
Hi AlvinLy,
Thankfully, I don't believe your problem is niche at all. However, it looks like your issue is there is no way in your model currently to know what city belongs to what Location. My first instinct is they should be in the same dimension table. I also don't think Project ID should be in your dimension tables; that is already in your sales fact table where it belongs.
EDIT: I see now that you have a Location ID and City ID in your fact table. It would be easier (and more intuitive!) if your "locations" were in the city table and not their own separate table. That detail should not be stored in your fact table, generally speaking.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Hi Wilson,
Thanks for looking at my data set so far. I understand as i was fabricating the data that it did not make complete sense, but the dimensions "location", "city", etc. are all alternatives that i made up compared to my real data, so instinctively it does not make sense, but this is a subset of a much larger dataset with many more fact and dimension tables where a snowflake schema may not be as robust as a plain star schem for my current situation
Thanks for going through the data though! Hopefully there is some function that does this or alternatively possibly some measures used as pseudo column in my table as calcs