The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hey Folks,
I have created a matrix visual by using 4 levels of data (L1,L2,L3,L4). Now I want to calculate the % based on the Hierarchy level total in the matrix visual. I have tried DAX sing ISINSCOPE,ISFILTERED but both are not working.
@lbendlin Thanks for your reply.
I have used below dax
HierarchySales =
VAR L1Col = CALCULATE(SUM(Sales[Amount]),ALLSELECTED(Sales[L1Column])
VAR L2Col = CALCULATE(SUM(Sales[Amount]),ALLSELECTED(Sales[L2Column])
VAR L3Col = CALCULATE(SUM(Sales[Amount]),ALLSELECTED(Sales[L3Column])
RETURN IF(ISINSCOPE(L1Column),L1Col ,IF(ISINSCOPE(L2Column),L2Col,L3Col)
But its showing same value as Amount column which is already there in Values section. By using above formula I want to calculate % of Hierarchy sales.
You need to test ISINSCOPE from the inside out, starting with L3.
ISINSCOPE is the right tool. Please explain what "not working" means. What have you tried?
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |