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% Actu...
- 3 years ago
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
Jihwan_Kim
Super User
3 years agoHi,
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 ) )
Stelles3000
3 years agoRegular 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_Kim3 years ago
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