Forum Discussion
New Card vs Multi-Row Card Results anomaly
So I have a measure that calculates a % value over a period of time (in this case 1 month but I have 12M and YTD versions), and also uses dynamic trending time intelligence so that when a user selects a month, it changes the value for that selected month (but in the case of 12M or YTD needs to include past months in consideration for its calculation). The DAX measure does what I want it to do and is accurate, but for reference I will post the DAX below (a generic version of it).
My question is this. When I plug it into either a legacy Original Card or a New Card visualization I get a blank result or "--" for anything other than the "Current Month" or its the wrong result. When I plug it into a table/matrix or a legacy Multi-Row Card, I get the right result (it changes with the new selection and calculates correctly). The reason appears to be that for the Multi-Row Card, I can add a date dimension value to the card along with the %1M measure and that keeps the result to the selected month only. However, the legacy Original Card and the New Card, do not have a way for me to do that. I wouldn't care except that the Multi-Row card has limited formatting options for UI style/look/feel, etc. I'll post an image of the different card results as well.
Do I have any options?
My Measure DAX -->
%1M Selected Month =
VAR ReferenceDate = MAX ('Calendar'[Date])
VAR ReferencePrevDate = MAX('Calendar LOOKBACK'[Date])
VAR PreviousDate =
DATESINPERIOD(
'Calendar LOOKBACK'[Date],
ReferenceDate,
-12,
MONTH
)
VAR Result =
IF(
(ReferencePrevDate = ReferenceDate) && MAX('Calendar LOOKBACK'[Date]) >= DATE(YEAR(ReferenceDate) , 1, DAY(ReferenceDate)),
CALCULATE(
DIVIDE([Numerator], [Denominator], 0) * 12,
REMOVEFILTERS('Calendar')
KEEPFILTERS(PreviousDate),
USERELATIONSHIP('Calendar'[Date], 'Calendar LOOKBACK'[Date])
),
BLANK()
)
RETURN
Result
10 Replies
- mbahonen
Advocate II
I won't be able to provide a sample. I tried to be descriptive as possible. Sorry. Basicallythe visuals do different things when i have the option to add a date dimension vs not, so the new card doesn't do exactly what either the original or multi-row card do alone. The date dimension allows for the dynamic time intelligence to work as expected.
- AnonymousNot applicable
Hi, mbahonen
This is normal behavior. New cards and normal cards are only for display. New cards can now add multiple fields and display them at the same time, but do not provide external filters for calculations of the previous measure. Old cards can only put one field.
The fields put in multi-line cards will provide calculation context, and the measure value can calculate the corresponding results based on these external label filters.It is not that your measure value is wrong or the time intelligence function does not work properly, but this is the design purpose. A multi-row card is essentially a table, so there is an external filter. The card is just a normal display function and does not provide a valuation environment for other measure values.
New card visual | Public preview | Microsoft Power BI Blog | Microsoft Power BI
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.