Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
I have a pricelist-table with different pricelists. All pricelists contain prices for items and an start date and an end date for each price / item. How do I show only prices that are valid today in Power BI?
Thanx in advance!
Solved! Go to Solution.
hi @sw123
supposing your table looks like:
try plot a table visual with all the columns and feed a measure to the filter pane like:
Measure =
IF(
MAX(TableName[startdate]) <= TODAY()
&&MAX(TableName[enddate]) >= TODAY(),
1,0
)
it worked like:
Hi, I want to create a table in Power BI, that shows a list of the items and the prices that are valid today (today is on or between the beginning date and end date).
hi @sw123
supposing your table looks like:
try plot a table visual with all the columns and feed a measure to the filter pane like:
Measure =
IF(
MAX(TableName[startdate]) <= TODAY()
&&MAX(TableName[enddate]) >= TODAY(),
1,0
)
it worked like:
Yes, this works great. But it did display the next problem 😄
We seem to have multiple prices in the price list for the same item, that seem to be valid today, but then actually only the one with the latest beginning date should show in the table.
For example, when the table looks like this:
It seems that all the prices are valid today, but should only show the ones with start date 3/1/2023. Can you help, with this issue also?
hi @sw123
then try like:
Measure =
VAR _maxdate =
MAXX(
ALL(TableName[startdate]),
TableName[startdate]
)
RETURN
IF(
MAX(TableName[startdate]) <= TODAY()
&&MAX(TableName[startdate]) = _maxdate
&&MAX(TableName[enddate]) >= TODAY(),
1,0
)
Hi,
This doesn´t return anything for me with filter 1. Do you have any idea what could be wrong?
Hi,
I am returning to this. Can anyone help me with what is wrong with ny measure and why it doesn´t return anything?
Hi @sw123
Just create a new measure [Today Sales] as below:
Today Sales = CALCULATE([Total Sales],FILTER(Table1,Table1[Date]=TODAY()))
Try above and let know if it solves or not
Proud to be a Super User! | |
Hi, there are two dates in the table, one beginning date and one ending date. And I want to show the prices that are valid today (today is on or between beginning date and end date). Can you still help me out?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
92 | |
75 | |
65 | |
51 | |
36 |
User | Count |
---|---|
113 | |
90 | |
80 | |
62 | |
40 |