Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Can I get kpi based on a column that is not a primary key?
for example
I selected 31-01-2019 and department 1, result is 80.0%
I want to show the kpi of the region through the ID_departamet.
I tried this, but do you add the KPIs (156.0%)
CALCULATE(
SUM(KPI[PORCENT]),
FILTER(
ALL(KPI),
KPI[LOCATION]=SELECTEDVALUE(LOCATION[REGION])
)
thank you....
Solved! Go to Solution.
Perhaps:
Measure =
VAR __deptID = SELECTEDVALUE('LOCATION'[ID_DEPARTMENT])
VAR __locID = LOOKUPVALUE('LOCATION'[ID_REGION],[ID_DEPARTMENT],__deptID)
VAR __date = SELECTEDVALUE('CALENDAR'[DATE])
RETURN
LOOKUPVALUE('KPI'[PORCENT],[ID_LOCATION],__locID,[DATE],__date)
Perhaps:
Measure =
VAR __deptID = SELECTEDVALUE('LOCATION'[ID_DEPARTMENT])
VAR __locID = LOOKUPVALUE('LOCATION'[ID_REGION],[ID_DEPARTMENT],__deptID)
VAR __date = SELECTEDVALUE('CALENDAR'[DATE])
RETURN
LOOKUPVALUE('KPI'[PORCENT],[ID_LOCATION],__locID,[DATE],__date)
Thank you very much my friend.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 20 | |
| 12 | |
| 10 |