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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |