The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have some issues with a Matrix visualisation.
Data (source) table:
I want to visualize, using a matrix, the amount of customers based on both Status and Prio. Moreover, I want to calculate the total percentage of customers per Prio vs the total number of customer for a specific Status using a measure called % Customers.
Measures used:
When I filter on customer A and D for example, the Table still shows the results that I expect:
Any idea what is going on here?
I've attached the pibx file I'm using.
Many thanks for your help!
Table:
Matrix:
Coming back to the example I've describe in my first post => I've created a Power BI report with two identical matrix visuals => one of them is behaving as I would expect, the other one isn't.
Link to Power BI report (incuding the DAX queries I'm referring to underneath): Problem Matrix Table Bis.pbix
I examined the DAX queries used by both visuals and the strange thing that I notice, is that for one of the matrix visuals, a NONVISUAL function is added to the query. So alhough both matrices are identical, for an unexplainable reason, Power BI added the NONVISUAL function to one of the matrices.
The query as I expected him (working matrix):
************
************
The query that creates bizarre results:
************
************
So question remains: what causes the NONVISUAL function to be added?
Many thanks!!!
Hi @dieterbe_vdb ,
Thanks for the reply from @ThxAlot , please allow me to provide another insight:
The hierarchical structure of the matrix is closely related to the context of the dax expression and, as a result, often causes some unexpected results. You can use dax expressions to create a dummy table and then perform calculations with the data in the dummy table to ensure the accuracy of the data.
MEASURE =
VAR _SUMMARIZE =
SUMMARIZE (
ALLSELECTED ( 'Data' ),
[Status],
"Count", COUNT ( 'Data'[Customer ] )
)
RETURN
SUMX ( FILTER ( _SUMMARIZE, [Status] = MAX ( 'Data'[Status] ) ), [Count] )
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for trying out.
Bizarre.... any idea where the difference comes from?
It seems that in my pibx file the matrix "remembers" that Customer D didn't had any entry with a low prio in an active status and so when filtering out the Prio field the matrix only takes the entries of customer A in into account resulting in "2" (it should be "3") for the Total All Prio measure. Very strange indeed that your file, using the same measures, does behave as expected.
So this leaves me in a situation where I can't trust the Matrix visual any longer (unless if we can find a logical explanation for it).
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
51 | |
51 | |
46 |