March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
Hi @mbahonen
lease provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.
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.
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.
I guess I wasn't suggesting it was wrong, just wondering if I have another option to get the result of the multi-row card but with more formatting options like the New Card. All three Card options have different formatting options, some more limited than others and its unfortunate. For example, I can't center the text in the multi row card.
Hi, @mbahonen
Thank you very much for your insight. I think it's worth looking for custom visuals if the default visuals don't provide this functionality.
Power BI's default visuals don't do everything in every case, and there's no way to tell you how to solve them, and it's hard to change the design for a particular need.
However, I understand that you have to complete your report, so after my search, I found the visual for this solution:
This is one of the best alternative solutions I've found.
If you have front-end development engineers in your organization, you can use HTML or SVG to achieve the effect of multi-line cards without the help of other finished products. This is the last resort when it comes to reporting.
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.
Thanks, I appreciate the suggestions. We try to stay away from customizations in our org because of lack of support issues. I do still think that this could be solved merely by expanding the formatting options of the multi-row card. It shouldn't be that difficult to allow center text formats for example. If the 3 types of cards offered similar (to the extent a feature like text is available) formats that would be better. I'd extend that to text boxes, buttons and shapes.
I will check out that custom card option though. Thanks for the suggestion.
Hi, @mbahonen
Thank you very much for your reply. Your idea is good. But in my experience, if a default visual needs to add something, you need to put up an idea in the ideas forum, and then have enough votes for that feature to appear in the next upgrade.
Here is another way of thinking, which can be tedious, but can achieve the same goal:
Use UNICHAR(10) to pass to the text concatenation symbol or function, and then center the whole set:
Measure =
"Item A:" & CALCULATE(SUM(Salestable[amount]),'DIM_Items'[itemname] ="Item A") & UNICHAR(10) &
"Item B:" & CALCULATE(SUM(Salestable[amount]),'DIM_Items'[itemname] = "Item B")& UNICHAR(10) &
"Item C:" & CALCULATE(SUM(Salestable[amount]),'DIM_Items'[itemname] = "Item C")& UNICHAR(10) &
"Item D:" & CALCULATE(SUM(Salestable[amount]),'DIM_Items'[itemname] = "Item D")& UNICHAR(10) &
"Item E:" & CALCULATE(SUM(Salestable[amount]),'DIM_Items'[itemname] = "Item E")& UNICHAR(10)
This method lacks interactivity and lends itself well as a static card effect. In contrast, it is more convenient and effective to use custom vision pairs.
The following method is implemented with a table:
Finally, adjust the column width to achieve the same effect as a multi-row card
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.
Thanks for the suggestion, unfortunately that solution doesn't include the filter context I need. I have "faked" the formatting I like in the past as well with other visuals. I have actually submitted something along the lines of what I'm asking for in the past here Microsoft Idea but getting traction on submitted ideas when there are so many is difficult.
Hi, @mbahonen
It's true that the ideas approach has had little effect, so I've provided a solution that is currently feasible above. You can post your ideas link here (others will be able to locate your case more quickly when searching) and then mark the solution and mark the reply to your question as the solution.
That way, so that the rest of the community knows about the alternative solution, as well as vote for your ideas, and strive to see it in the new version sooner rather than later!
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
80 | |
59 | |
57 | |
43 |
User | Count |
---|---|
186 | |
110 | |
82 | |
63 | |
50 |