Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello together,
i need your help 🙂
My Report need the age from the customer, but i get always a error i don't know why.
Geburtstag and heute is a date Format
This my DAX-Query 1
if
(Date.Year([Heute]) - Date.Year([Geburtstag])
- (if Date.Month([Heute]) < Date.Month([Geburtstag]) then 1 else
if Date.Month([Heute]) = Date.Month([Geburtstag]) and Date.Day([Heute]) < Date.Day([Geburtstag]) then 1 else 0)) < 0 then null
else
Date.Year([Heute]) - Date.Year([Geburtstag]) -
(if Date.Month([Heute]) < Date.Month([Geburtstag]) then 1 else
if Date.Month([Heute]) = Date.Month([Geburtstag]) and Date.Day([Heute]) < Date.Day([Geburtstag]) then 1 else 0))
Secand Query:
Solved! Go to Solution.
@leazimmer , if this is measure then
Age = datediff( max('konzeptum'[Geburtstag]), today(), year)
and you need row context
sumx('konzeptum', datediff('konzeptum'[Geburtstag], today(), year))
or
AverageX('konzeptum', datediff('konzeptum'[Geburtstag], today(), year))
or
Sumx(Values('konzeptum'[Kustomer]), calculate(datediff( max('konzeptum'[Geburtstag]), today(), year) ))
I get a error message
@leazimmer , if this is measure then
Age = datediff( max('konzeptum'[Geburtstag]), today(), year)
and you need row context
sumx('konzeptum', datediff('konzeptum'[Geburtstag], today(), year))
or
AverageX('konzeptum', datediff('konzeptum'[Geburtstag], today(), year))
or
Sumx(Values('konzeptum'[Kustomer]), calculate(datediff( max('konzeptum'[Geburtstag]), today(), year) ))
@leazimmer , You can create new columns
example
Age = datediff([Geburtstag ], today(), year)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |