Forum Discussion
Stelles3000
3 years agoRegular Visitor
Procentage measure based on a specific row
I need a procentage measure which a specific row is the bases.
| Namefield | Amount | % Measure |
| Over | 150000 | 591% |
| Target | 25366 | 100% |
| Actual 1 | 15000 | 59% |
| Actual 2 | 16555 | 65% |
| Actual 3 | 22555 | 89% |
Target should allways be 100%. Numbers can change! The column % Measure is the result.
Hi,
Thank you for your message.
Please try something like below.
Target measure: = VAR _target = CALCULATE ( SUM ( Data[Amount] ), FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" ) ) RETURN _target
3 Replies
- Jihwan_Kim
Super User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated measure.
Percent measure: = VAR _target = CALCULATE ( SUM ( Data[Amount] ), FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" ) ) RETURN IF ( HASONEVALUE ( Data[Namefield] ), DIVIDE ( SUM ( Data[Amount] ), _target ) )- Stelles3000Regular Visitor
Thx for response. How do I create another coulmn that shows the target Amount in each row like this:
Namefield Amount % Measure Target Over 150000 591% 25366 Target 25366 100% 25366 Actual 1 15000 59% 25366 Actual 2 16555 65% 25366 Actual 3 22555 89% 25366 - Jihwan_Kim
Super User
Hi,
Thank you for your message.
Please try something like below.
Target measure: = VAR _target = CALCULATE ( SUM ( Data[Amount] ), FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" ) ) RETURN _target