Forum Discussion
Relationship status impacting data visualization?
- 6 years ago
As I suspected the solution came down to my improper use of the Relations between entities. I spent some more time familiarizing myself with DAX. Specifically the USERELATIONSHIP function and managed to bypass the troublesome active relationship and specify a sales volume with a brand.
Sorry for the confusing nature of my previous replies. I am still very new to this. I appreciate all the attempts to help clarify.
Total Volume (Filtered) = CALCULATE(SUM(volume1]), USERELATIONSHIP(brandid],brand1]))
+ CALCULATE(SUM(volume2]), USERELATIONSHIP(brandid],brand2]))
+ CALCULATE(SUM(volume3]), USERELATIONSHIP(brandid],brand3]))
+ CALCULATE(SUM(volume4]), USERELATIONSHIP(brandid],brand4]))
Hi mrbrewmaster ,
Could you please provide your expected result in the form of table or screen shot? And what's the calculation logic of total $ or count? size1count+size2count+size3count+size4count? The information in this table which post in your latest post is a bit confusing, could you please explain the source of these data and its actual application scenario? It may need to make some adjustments according to your needs later...
In addition, you can refer the following blog to create the related pie chart.
How to Create a Power BI Pie Chart
Best Regards
Rena
Anonymous Apologies, the last post was a slightly redacted table as it exports from the entity in Power Apps. Below is a slightly easier to read example table (Ex.1) with similar content to my real table. I am utilizing Power Apps entities in CDS to track orders via a Model-based app. So every new submittal adds a row to the table.
Ex. 1
Ideally I would be able to take this data and transform it into a combination table like in the following example (Ex. 2).
Ex.2
Then I could utilize the columns to make my pie chart as below (Ex.3a and 3b).
Ex. 3a
Ex.3b
And presumably filter in Power BI similarly to how I can in Excel (Ex. 4a and 4b)
Ex.4a
Ex.4b
Or combine separate volumes between the same brand to get a total volume per brand (Ex.5a and 5b)
Ex.5a
Ex.5b
In the actual instance. I have a measure created to calculate Total Volume. However when I apply the brand list in the Legend field it only labels the brands present in the first brand field from the entity (which is the active relationship, brand1 to brandlist). If I change which relationship is active, the brands shown will also change. In both cases the volume remains correct. It is only attributed to the active relationship brand.
I am also open to changing the way things are saved to the entity or adding fields as needed to preempt Power Query or Calculations in Power BI.
I hope that all made sense. I am happy to continue to clarify as I am able (from an ability standpoint).