Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |