Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I run the following calculation and typically it works, for some days I've been receiving this message:
"an argument of function power has the wrong data type or is too..."
this is the code:
Solved! Go to Solution.
BTW, using variables and a SWITCH makes this kind of measure much easier to read.
Try something like this:
Output =
VAR _X = SELECTEDVALUE ( 'Horizon'[X] )
VAR _Qtr = SUM ( '3m'[Y] ) / SUM ( Value[Y] )
VAR _Year = SUM ( '12'[Y] ) / SUM ( Value[Y] )
RETURN
SWITCH (
_X,
"3m (annualized)",
IF ( _Qtr ^ 4 = 0, 0, ( _Qtr ^ 4 - 1 ) * 100 ),
"3m",
IF ( _Qtr = 0, 0, ( _Qtr - 1 ) * 100 ),
"12m",
IF ( _Year = 0, 0, ( _Year - 1 ) * 100 )
)
Hi @Anonymous
Does @AlexisOlson 's method help you resolve the issue? If does, please kindly Accept it as the solution. More people will benefit from it.
Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Eyelyn Qin
Hi @Anonymous
Does @AlexisOlson 's method help you resolve the issue? If does, please kindly Accept it as the solution. More people will benefit from it.
Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Eyelyn Qin
BTW, using variables and a SWITCH makes this kind of measure much easier to read.
Try something like this:
Output =
VAR _X = SELECTEDVALUE ( 'Horizon'[X] )
VAR _Qtr = SUM ( '3m'[Y] ) / SUM ( Value[Y] )
VAR _Year = SUM ( '12'[Y] ) / SUM ( Value[Y] )
RETURN
SWITCH (
_X,
"3m (annualized)",
IF ( _Qtr ^ 4 = 0, 0, ( _Qtr ^ 4 - 1 ) * 100 ),
"3m",
IF ( _Qtr = 0, 0, ( _Qtr - 1 ) * 100 ),
"12m",
IF ( _Year = 0, 0, ( _Year - 1 ) * 100 )
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |