Forum Discussion
djreyes
2 years agoHelper I
Year Computation
Hello, I have a measure added in powerbi = ([QTY negative to positive max per item]*3)/365*([average qty]*1.2) How do I make the 365 change that when they select a year filter it will become 730 i...
- 2 years ago
Right, it should autometically come into slicer and hence in report.
If this resolves your problem, then please mark this as solution, Thanks!
samratpbi
2 years agoSuper User
Hi, lets create a slicer on the years which you are going to select then create a measure below:
Years Selected =
IF(
NOT(ISFILTERED(DynCol[Year])),
1,
COUNTROWS(
SUMMARIZE(
DynCol,
DynCol[Year]
)
) + 1
)
what it will do is, if no year selected, then it would return 1, otherwise it would return no of years selected + 1, i.e. if 1 year selected it would return 2 and so on.
now, you simply multiply this measure with 365 in your existing measure.
Below is the result:
now, you simply multiply this measure with 365 in your existing measure.
Below is the result:
when no year selected:
when 1 year selected:
Hope this resolves your problem,
If this helps to resolve your problem then please mark it as solution, Thanks!