Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys, need help
I want to create measure that will return variant (3 column) if date (1 column) will equal to Today() - 1 (previousday) and item (2 column) will equal to specific text value, for example "Селитра аммиачная"
Solved! Go to Solution.
Hi, @DauletKali
It’s my pleasure to answer for you.
You may be a little confused about measure and column, If you use column, you must keep the data types of true and false results consistent. Empty strings belong to text and you can omit them instead(blank()default).
Like this:
Or you can create a measure with selectedvalue.
Like this:
Measure =
IF (
SELECTEDVALUE ( Table1[Date] ) = TODAY ()
&& SELECTEDVALUE ( Table1[Item] ) = "A",
SELECTEDVALUE ( Table1[Quantity] ),
""
)
If it doesn’t solve your problems, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @DauletKali
It’s my pleasure to answer for you.
You may be a little confused about measure and column, If you use column, you must keep the data types of true and false results consistent. Empty strings belong to text and you can omit them instead(blank()default).
Like this:
Or you can create a measure with selectedvalue.
Like this:
Measure =
IF (
SELECTEDVALUE ( Table1[Date] ) = TODAY ()
&& SELECTEDVALUE ( Table1[Item] ) = "A",
SELECTEDVALUE ( Table1[Quantity] ),
""
)
If it doesn’t solve your problems, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
As a new column , Use date and the other column that should be equal, column is option
sumx(filter(Table, [date] = earlier([date])-1 && [Column] = earlier([column])),[Value])
measure with date table
Day behind Sales = CALCULATE(SUM(Table[Value]),dateadd('Date'[Date],-1,Day))
This Day = CALCULATE(SUM(Table[Value]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(SUM(Table[Value]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(SUM(Table[Value]), previousday('Date'[Date]))
refer:Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Thank for your quick response, but this does not work for my example
Let me show it in following example
I want to create a measure which will return "Quantity", IF Date will equal to TODAY and Item to, for example, A
Assume that today is 03/01/2020
Date | Item | Quantity |
01.01.2020 | A | 100 |
02.01.2020 | B | 50 |
03.01.2020 | A | 20 |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |