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.
So I know you cannot have the outcome of a measure into a slicer, but surely there is some kind of workaround??
If I have this :
\
Late Indicator is just a measure stating that if HourNr > 20 then "Late" else "On Time"
Now I would like to give the user the opportunity to only show all "Late" by selecting that option in a slicer.
(don't want them to use the filer pane themselves)
Would think that happens 1000 times a day for people making reports.
So there must be something you can do about this?
Hi,
Share the download link of the PBI file.
Hi @rpinxt
Please try this:
First of all, I create a set of sample:
Then add a new table:
Table 2 = {"On time","Late"}
Next, add a measure2:
Measure 2 =
VAR _newData = SELECTEDVALUE('Table 2'[Value])
RETURN
IF(
[Measure] = MAX('Table 2'[Value]),
MAX('Table 2'[Value])
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-zhengdxu-msft your solution seems to work well.
But there is a severe difference with my situation I think.
Your field Status, which indicates if a line is Late or On Time, is a table field.
But my field Late Indicator is not a table field. It is a Measure.
So in your dax for Measure :
Hi @rpinxt
I think may be you can give this solution a chance that the solution is to use the values in the new table to match what the measure returns.
Please have a try.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Well I did try @v-zhengdxu-msft .
But what I am saying is that in this line :
CALCULATE(SELECTEDVALUE('Table'[Status]),FILTER(ALLSELECTED('Table'),'Table'[ID]=_currentID))
The bold part I cannot put in my field 'Late Indicator' because that is a measure.
Slectedvalue command will not accept it.
Hi @rpinxt
Maybe I'm explaining it incorrectly, you don't need to copy the measure.
The measure is created as a reference.
What you need to do is to create a new table and add a measure 2, you can use your measure[Late Indicator] to replace the [measure].
Or could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ok I think I get it.
So I now did that:
So the blanks I can handle, just do indicator when Hours is not blank.
But look at the reds. That is not right. The Late Indicator gives On Time (correct because < 20) but the Indicator says late.
I put the test file here so you can have a look:
https://drive.google.com/file/d/1kqEl5FpSeuGMDqEMP24J0XDK8hIx8AeO/view?usp=sharing
Hi @rpinxt
Unfortunately that this link cannot be open.
Maybe you can share your data(excluding sensitive data), or create some sample data.
It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That is strange @v-zhengdxu-msft , I checked and the link is public. Maybe google drive had problems.
I will paste the snippet of data for the screenshot I share in a table :
Material Document Number | Material | Batch | Mat/Batch | Posting Date | Time | Sloc | MvT | Qty |
3442161746 | 600238198 | 40214G1 | 60023819840214G1 | 3/5/2024 | 11:30:53 | INTR | 311 | -1400 |
5045755984 | 600238198 | 40214G1 | 60023819840214G1 | 3/4/2024 | 14:31:14 | INTR | 101 | 1400 |
3442169685 | 600238198 | 40215G1 | 60023819840215G1 | 3/5/2024 | 12:08:21 | INTR | 311 | -1370 |
5045755984 | 600238198 | 40215G1 | 60023819840215G1 | 3/4/2024 | 14:31:14 | INTR | 101 | 1370 |
3442988943 | 600238198 | 40217G1 | 60023819840217G1 | 3/8/2024 | 12:38:10 | INTR | 311 | -540 |
3442988944 | 600238198 | 40217G1 | 60023819840217G1 | 3/8/2024 | 12:38:45 | INTR | 311 | -540 |
3442988947 | 600238198 | 40217G1 | 60023819840217G1 | 3/8/2024 | 12:39:31 | INTR | 311 | -325 |
5045813877 | 600238198 | 40217G1 | 60023819840217G1 | 3/7/2024 | 14:11:14 | INTR | 101 | 1405 |
3442982025 | 600238198 | 40219G1 | 60023819840219G1 | 3/8/2024 | 11:59:40 | INTR | 311 | -540 |
3442982084 | 600238198 | 40219G1 | 60023819840219G1 | 3/8/2024 | 12:00:50 | INTR | 311 | -540 |
3442982796 | 600238198 | 40219G1 | 60023819840219G1 | 3/8/2024 | 12:01:45 | INTR | 311 | -295 |
5045813877 | 600238198 | 40219G1 | 60023819840219G1 | 3/7/2024 | 14:11:14 | INTR | 101 | 1375 |
3444202304 | 600238198 | 40220G1 | 60023819840220G1 | 3/14/2024 | 10:07:40 | INTR | 311 | -360 |
3444209773 | 600238198 | 40220G1 | 60023819840220G1 | 3/14/2024 | 10:40:29 | INTR | 311 | -530 |
3444212907 | 600238198 | 40220G1 | 60023819840220G1 | 3/14/2024 | 10:52:15 | INTR | 311 | -495 |
5045898297 | 600238198 | 40220G1 | 60023819840220G1 | 3/13/2024 | 18:26:13 | INTR | 101 | 1385 |
Hi @rpinxt
I don't even understand why this workaround went wrong on your side, I will attach the pbix file in this post.
Some measures may be lacked, here I add two measure([Hours],[Qty1]) to analog them, but that's no matter, they won't affect the outcomes.
A new table added just like the reply I posted first:
Table 2 = {"On time","Late"}
Then add a new measure:
Measure 2 =
VAR _newData = SELECTEDVALUE('Table 2'[Value])
RETURN
IF(
[Late Indicator] = _newData,
_newData
)
The result is as follow:
Actually that I think the measure isn't a good idea to use the slicer.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |