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
I am trying to do a Year on Year % change, but i keep getting an error. It cannot load the data for this visual. The full error message is: MdxScript(Model) (146,94) Calculation error in measure: DAX comparison values of type Text with values of type Number. Consider the VALUE or FORMAT function to convert one of the values.
The script i am using:
YOY Deposit Count % Change =
VAR LastYear =
CALCULATE(
SUM('Summaryv1'[Count Deposits]),
FILTER(ALLEXCEPT('Summaryv1','Summaryv1'[Site Name],'Summaryv1'[Current VIP Status]),FORMAT(Summaryv1[Date Formatted],"General Number")=fORMAT(FIRSTNONBLANK(Summaryv1[Year],Summaryv1[Year]),"General Number")-1)
)
VAR ThisYear = SUM('Summaryv1'[Count Deposits])
RETURN
(ThisYear-LastYear)/LastYear
If any one has any ideas as to how to get this working, i would be most grateful.
Hi i'm trying to do filtered calculations for which i created a measure but its not working . I have tried changing the types of columns, still nor esult
Couldn't load the data for this visual
MdxScript(Model) (14, 52) Calculation error in measure 'Sheet1 Measure 15: DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values
Hi @michael_asamoah,
This is a little confusing if we just see it literally. Actually Format returns a string. Please refer to this documentation. I would suggest using Value instead or changing the format to numerical type directly.
Best Regards,
Dale
User | Count |
---|---|
86 | |
84 | |
34 | |
34 | |
34 |
User | Count |
---|---|
94 | |
79 | |
63 | |
55 | |
51 |