Forum Discussion
Days calculating error
- 7 years ago
Hi Anonymous
Try this for your measure, placing it in the values of a matrix with Month and Day on rows as you show. Table1 is the table containing Month and Day columns shown in the matrix visual.
Calc Target = SELECTEDVALUE ( Table1[Day] ) * DIVIDE ( CALCULATE ( COUNT ( Table1[Day] ) - 1, ALL ( Table1[Day] ) ), [BaseValue] )
Hi Anonymous
Try this for your measure, placing it in the values of a matrix with Month and Day on rows as you show. Table1 is the table containing Month and Day columns shown in the matrix visual.
Calc Target =
SELECTEDVALUE ( Table1[Day] )
* DIVIDE (
CALCULATE ( COUNT ( Table1[Day] ) - 1, ALL ( Table1[Day] ) ),
[BaseValue]
)
Hi AlB
Thank you for the help so fast. :smileyvery-happy:
Could you tell me why the code I have posted did not work? Just to understand the reason ...
Tks
- AlB7 years agoCommunity Champion
Anonymous
:smileyhappy: You're welcome.
I could, if you share the pbix. Otherwise we'd have to spend too much time while I ask about details omitted in your explanation.
In any case, my current guess would be as follows:
Fact: the division yields infinite,
so [Interval Days] must be zero,
which means [Initial Day] = [Last Day],
which implies that MIN(dCalendario[Data]) = MAX(dCalendario[Data]),
from which we can deduce that the day number for dCalendario[Data] has a sole distinct value in the filter context when the measure is evaluated.
You have Month and Day in the rows of your visual. That defines a sole day number value in dCalendario[Data].
- AlB7 years agoCommunity Champion
Anonymous
Was I clear enough?
- Anonymous7 years agoNot applicable
Hi AlB !
Sorry for the delay in reply, I was traveling on the weekend.
Thank you, I understood your explanation, but I do not understand why the interval of days on the card is normally displayed, but when I use it in a measure the interval considered is zero. : smileyfrustrated:
Ok I'll check to share the PBIX here ...Greetings !