Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I'm new in power bi and currently facing an issue with the previous measure.
This is my raw data.
Timestamp | Type | Result |
16/08/2023 04:00 | A | 0 |
16/08/2023 04:30 | A | 0 |
17/08/2023 04:00 | A | 1 |
17/08/2023 04:30 | A | 0 |
18/08/2023 04:00 | A | 1 |
18/08/2023 04:30 | A | 1 |
16/08/2023 04:00 | B | 0 |
16/08/2023 04:30 | B | 0 |
17/08/2023 04:00 | B | 1 |
17/08/2023 04:30 | B | 0 |
18/08/2023 04:00 | B | 1 |
18/08/2023 04:30 | B | 1 |
16/08/2023 04:00 | C | 0 |
16/08/2023 04:30 | C | 0 |
17/08/2023 04:00 | C | 1 |
17/08/2023 04:30 | C | 0 |
18/08/2023 04:00 | C | 1 |
18/08/2023 04:30 | C | 1 |
For example, I would like to create a measure that count the final result. I group the column by date and type, max the results.
I custom the result to true(0) and false (1).
In my dashboard, i would like to create a matrix of the type and Custom.
Rows will be type and values should be shown true and false for each type.
Such as 16-18 August are week 33, when i filter the date to week 33, the result should be false for all types even though 16 are all true.
But when filter to 16 August , the result should shown in true in the matrix.
Other than that, I would like to create a measure that just shown the final result of 0 or 1 for true and false. The measure data here shown sum of the final result that is not i want.
The measure that I used previously are shown below. This measure calculate when the value reach zero will count as true, but now i want to change it to must whole day is zero and true.
Water Zero =
var T1=
ADDCOLUMNS('Water Incoming Zero Condition',"@Final", CALCULATE( NOT ISEMPTY('Water Incoming Zero Condition'),'Water Incoming Zero Condition'[Result]= 0))
var T2=
SELECTCOLUMNS(T1,"@@Final",[@Final])
Return
if(FALSE() in T2,FALSE(),TRUE())
Date for month = IF([Water Zero]=TRUE(),"0","1")
Kind regards.
Hi @qwerttty ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Water Zero =
VAR _seldates =
ALLSELECTED ( 'Water Incoming Zero Condition'[Timestamp] )
VAR _seltype =
SELECTEDVALUE ( 'Water Incoming Zero Condition'[Type] )
VAR _maxdate =
CALCULATE (
MAX ( 'Water Incoming Zero Condition'[Timestamp] ),
FILTER (
ALLSELECTED ( 'Water Incoming Zero Condition' ),
'Water Incoming Zero Condition'[Type] = _seltype
)
)
RETURN
CALCULATE (
MAX ( 'Water Incoming Zero Condition'[Custom] ),
FILTER (
ALLSELECTED ( 'Water Incoming Zero Condition' ),
'Water Incoming Zero Condition'[Type] = _seltype
&& 'Water Incoming Zero Condition'[Timestamp] = _maxdate
)
)
Best Regards
Hi @v-yiruan-msft,
Thanks for the help again.
For the sum of the result, are there any way just shown the result at that there, not in total of the list of data?
Example, 14 Sep should be 0 and 15 Sep should be 1.
Do you have a solution for this issue?
Kind regards.
Hi @v-yiruan-msft,
Thanks for helping with the question.
I have tried to used the measure that you created. It works for some situation, but some is not function.
For example, in the situation of my data is shown in the image below.
At the selection of date 14 september, only Ch6 shown true for me, however, the correct answer for this situation are ch2,and remaining should true also.
Do you have a solution for this issue?
Kind regards.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
79 | |
52 | |
39 | |
35 |
User | Count |
---|---|
92 | |
79 | |
51 | |
48 | |
45 |