Forum Discussion
Dynamic summarize
What you need is not summarize, but dimension tables linked to fact table to calculate measures based on different segmentation.
Ex: You'd add dimension tables for ordertype, country, calendar etc.
And then link dimensions to fact table (Orders), using column(s) from dimension table as primary and columns(s) from fact table as foreign. This is typically referred to as Star Schema and one of most common ways to structure data model for reporting/analysis.
You can find articles in links:
https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships
- parry2k7 years agoSuper User
Tasos i looked at your pbix, not sure why there is a need of summry table. Can you clairfy ?
- Tasos7 years agoHelper II
Thank you all for the immediate reply.
I am not really sure if I do need the summary table or not. The reason why I thought I need it, as I mentioned in my first message, is that the same order can have multiple products/countries etc. What I want to create is a dynamic bar chart where in the X-Axis I am having the different numbers of order lines and the number of orders is used as a value. (in the pbi file, I have added the wanted graph)
I am looking at Chihiro reply now. Hopefully, my text above helps you understand my original message.
Thanks again for your time
- Tasos7 years agoHelper II
I have been trying to understand how Chihiro's suggestion could answer my question and I fail to do that.
Could you please use the example and make a high-level example of what you meant?
Thanks,
Tasos
- Chihiro7 years agoSolution Sage
Oh, I get it now, I misunderstood your question orignally.
To clarify, what you want is dynamic histogram, based on slicer selection?
This isn't possible through conventional means that I can think of.
Since DAX tables and calculated columns are calculated when the model is first processed, and will not update with slicer selection.
Are you ok with using R-Visual with script?
There may be way to do it in DAX, but I'll have to think on it a bit.
- Tasos7 years agoHelper II
Yes. Now you have really understood my problem.
I agree with you, columns are based on the total values and not the page slicers.
I haven't tried the R-visual before. If you can do it, then I can just copy your solution to my file.
In any case, I appreciate your help!