Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi everyone,
I am new Power BI user. I have a table with the vessel name and the volume to be discharged and I want to create a visual that shows me the next three shipments to be discharged depending on the slicer range. I would like to know why kind of DAX formula I can use. I have been trying to use the Top N filter but it doesn't woprk so I am not sure what I am doing wrong.
Solved! Go to Solution.
Hi @HMSF ,
You can follow the steps below to get it:
1. Create a date dimension table(Do not create any relationship with your fact table)
2. Create a slicer and apply the date field of the above date dimension table on it
3. Create a measure as below
Flag =
var _mindate=min('Date'[Date])
var _maxdate=max('Date'[Date])
var _seldate=selectedvalue{'Facttable'[Date])
return if(_seldate>=_mindate&&_seldate<=_maxdate,1,0)
4. Create a table visual and apply the visual-level filter with the condition (Flag is 1)
Best Regards
I want that when I select a date range in the slicer I can see the current shipments and the next three shipments
Hi @HMSF ,
You can follow the steps below to get it:
1. Create a date dimension table(Do not create any relationship with your fact table)
2. Create a slicer and apply the date field of the above date dimension table on it
3. Create a measure as below
Flag =
var _mindate=min('Date'[Date])
var _maxdate=max('Date'[Date])
var _seldate=selectedvalue{'Facttable'[Date])
return if(_seldate>=_mindate&&_seldate<=_maxdate,1,0)
4. Create a table visual and apply the visual-level filter with the condition (Flag is 1)
Best Regards
Hi @HMSF ,
Which field you applied on the slicer? What's your expected result? Could you please explain the backend logic base on the provided sample data? It would be helpful to get the solution. Thank you.
Best Regards
The field that I applied for the slicer is the date. The result that I want is that when I choose a date range (slicer) I can see the next 3 vessels name with the material and the volume.
Hi @HMSF ,
Thanks for your reply. I'm still not clear about your requirement. As you said, you applied a date field on the slicer. Base on your sample data, if select the date from 5/1/2024 to 5/22/2024, then it will display 3 rows with red square in the below screenshot?
Best Regards
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
16 | |
13 | |
10 | |
8 |
User | Count |
---|---|
59 | |
20 | |
12 | |
11 | |
10 |