Forum Discussion

analytics_ISFC's avatar
analytics_ISFC
Frequent Visitor
6 years ago

Calculation change with drill down

Hi Community,

 

I have to calculate percentage of principal outstanding at state and branch level but my denominator will change for State and Branch.
My dax is not behaving correctly for State as I drill up. it is keeping denominator of branchname.

 

For example:

 
Loan NoStateBranchNamePOS
1RajasthanJaipur2
2MaharashtraNasik5
3MPIndore1
4RajasthanJaipur7
5MaharashtraNasik3
6RajasthanJaipur1
7Rajasthanjaiselmer3
8Maharashtranagpur1
9MPIndore2
10MPbhopal2

 

My DAX is:

IF(HASONEVALUE('Summarized MIS'[State]),'Summarized MIS'[POS]/CALCULATE(SUM('Summarized MIS'[POS]), ALLEXCEPT('Summarized MIS','Summarized MIS'[State])),'Summarized MIS'[POS]/CALCULATE(SUM('Summarized MIS'[POS]), ALLEXCEPT('Summarized MIS','Summarized MIS'[BranchName])))
 
it is working for BranchName but not for State.
the value should change dynamically as I drill up or drill down. 

15 Replies

  • I have been stuck at this problem for a very long time and it is highly important for me to find a solution. Any help would be appreciated.

     

    Thanks in advance!

    • Anonymous's avatar
      Anonymous
      Not applicable
      This does not look to be a measure. It's a calculated column, right?

      Best
      D