The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all, a helpless newbie here.
I want to create a measure (not calculated column) that :
I've created a supporting table - Age Group [as shown in the image below], with a min and max value.
I am getting errors for my DAX code :
Solved! Go to Solution.
@holywasabi , Try using below dax
Customer Age Group =
VAR CustomerAge = [Customer Age (Based on year signed-up)]
RETURN
CALCULATE(
VALUES('Age Group'[Age Group]),
FILTER(
'Age Group',
CustomerAge >= 'Age Group'[Min] &&
CustomerAge <= 'Age Group'[Max]
)
)
Proud to be a Super User! |
|
This works, thank you very much! 😊
@holywasabi , Try using below dax
Customer Age Group =
VAR CustomerAge = [Customer Age (Based on year signed-up)]
RETURN
CALCULATE(
VALUES('Age Group'[Age Group]),
FILTER(
'Age Group',
CustomerAge >= 'Age Group'[Min] &&
CustomerAge <= 'Age Group'[Max]
)
)
Proud to be a Super User! |
|
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |