Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I am working with inventory of cattles.
Need to segregate cattle that went to "Confinamento" (Pasto_DimDescricao), the first date and last date it was weighted (Data PS) and the weight (Peso) in those dates to know the gain weight during those days in "confinamento".
I have the measures for the first and last date, but don`t know how to do a measure to find only cattle that went to "Confinamento".
Solved! Go to Solution.
Hi, @marcos_moraes ;
Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @marcos_moraes ;
Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @marcos_moraes ;
I am very sorry that I did not understand the result and meaning you want to output. As I understand it, the earliest date for each IDE is "confinamento", right? If so, try:
Data Primeira Pesagem2 = IF(MAX([Pasto_DimDescricao])="Confinamento",
CALCULATE (
MIN ( 'DataArquivo_Fato'[Data Ps] ),
FILTER (
ALL(DataArquivo_Fato),[IDE]=MAX([IDE])&&
'DataArquivo_Fato'[Pasto_DimDescricao] = "Confinamento"
)
))
The final output is shown below:
If not, can you share me more details about your logic? and share some scenario about result what you want to output?
The most important parts are:
1. Sample data as text or screenshots.
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this:
Data Primeira Pesagem =
CALCULATE (
MIN ( 'DataArquivo_Fato'[Data Ps] ),
FILTER (
ALL ( 'DataArquivo_Fato' ),
'DataArquivo_Fato'[Pasto_DimDescricao] = "Confinamento"
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi VahidDM,
Unfortunately, it didn`t work.
Measure is considering the first date of the first register such as:
rgds
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 82 | |
| 66 | |
| 42 | |
| 27 | |
| 25 |