Value Shown in Card
Getting the error 'An Argument of Function Date has wrong data type or result is too small or too large' when the following measure is included in any graph.However the Value is shown properly in KPI.
Solved! Go to Solution.
hi, @kb_barge
It seems that in another forum there is an exactly same post and it has been solved, Is that your post?
If not you could refer to it.
I think this has to do with a lack of context around the [From_Date] and [To_Date] in your Variables. However, without access to your source data and not knowing anything about your datamodel due to lack of context I'm making huge assumptions here.
PowerBI ( or rather the DAX ) has no idea which set of dates you want it to use.
Attempt something like:
LastYear =
VAR lastFromDate =
SELECTEDVALUE(From_Tbl[From_Date], TODAY()) - 365
VAR lastToDate =
SELECTEDVALUE(To_Tbl[To_Date], TODAY()) - 365
RETURN
IF (
[DateDiff] > 365,
0,
SUMX (
FILTER (
ALL ( WUSA_CAL_DIM ),
WUSA_CAL_DIM[End_Date] >= lastFromDate
&& WUSA_CAL_DIM[End_Date] <= lastToDate
),
[Sales_Value]
)
)
As the solution, the problem is that there is no row context in measure for
Best Regards,
Lin
The simple solution for that is to understand are you applying -1 (day before) to the day or to the full date (yyyy,mm,dd) or just to the day (dd).
For Example: If you are applying -1 to the day and the today is 1st of the month it througn an error as it try to find 1-1 with no date reference where if you apply end of the date that work absolutely fine even for the 1st of the month.
Thanks for the explanation. It helps me to fix my time intelligence table! Thank you so much!
--------------------
My error message was:
"Couldn't load the data for this visual
The query referenced calculated table 'Time Intelligence' which does not hold any data because evaluation of one of the rows caused an error."
Original DAX table:
Time Intelligence =
...
======================================
It only breaks on 1st of the month, so I change the DAX to
"
"
hi, @kb_barge
It seems that in another forum there is an exactly same post and it has been solved, Is that your post?
If not you could refer to it.
I think this has to do with a lack of context around the [From_Date] and [To_Date] in your Variables. However, without access to your source data and not knowing anything about your datamodel due to lack of context I'm making huge assumptions here.
PowerBI ( or rather the DAX ) has no idea which set of dates you want it to use.
Attempt something like:
LastYear =
VAR lastFromDate =
SELECTEDVALUE(From_Tbl[From_Date], TODAY()) - 365
VAR lastToDate =
SELECTEDVALUE(To_Tbl[To_Date], TODAY()) - 365
RETURN
IF (
[DateDiff] > 365,
0,
SUMX (
FILTER (
ALL ( WUSA_CAL_DIM ),
WUSA_CAL_DIM[End_Date] >= lastFromDate
&& WUSA_CAL_DIM[End_Date] <= lastToDate
),
[Sales_Value]
)
)
As the solution, the problem is that there is no row context in measure for
Best Regards,
Lin
Hi,
I am also getting the same error and the measures are working fine with other reports. I am wondering why its not working with same date format, same logic and same measures.
I am trying to calculate the rolling 12 months based on the selection in the slicer.
e.g. If Aug is selected then the values displayed will be from before last 12 months before august.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
102 | |
77 | |
70 | |
48 | |
47 |
User | Count |
---|---|
158 | |
86 | |
80 | |
68 | |
66 |