Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I have a table (table1) created by DAX, it returns the products and their last input value. I tried to create a calculated column to find the lowest value per group (presentation). So, in theory, this column (column 1) is returning me correctly, but there are some products that it returns the lowest value of a product that has no presentation, the big problem is just that.
Below is the table and column used.
PS: I already tried using measures or a new calculated table.
Table 1:
You have a table, UltimasEntradas, which is a summary of another table, Entradas, and it's filtered for entries within the last 180 days. This table gives you the product ID, product name, the last date of entry, and the last value without tax for each product.
You're trying to get the minimum value (ultimovalor) for each group (apresentacao). The problem you're facing is that for some products, the minimum value returned is from a product that doesn't belong to any presentation group.
The DAX for Column 1 you provided is trying to get the minimum value for each group and then return the product name (nomeproduto) that has this minimum value.
From what I understand, the issue is that the minimum value is sometimes taken from a product that doesn't belong to any presentation group. To fix this, you should filter out those products without a presentation before calculating the minimum value.
Here's a suggestion to modify your Column 1:
Min_Produto =
VAR MinValue =
CALCULATE(
MINX(UltimasEntradas, UltimasEntradas[UltimoValor]),
ALLEXCEPT(UltimasEntradas, 'apresentaçao'[apresentacao]),
NOT(ISBLANK(UltimasEntradas['apresentaçao'[apresentacao]])) -- This line ensures we only consider products with a presentation
)
RETURN
MINX(
FILTER(UltimasEntradas, UltimasEntradas[UltimoValor] = MinValue),
UltimasEntradas[NomeProduto]
)
The added line ensures that when calculating the minimum value, it only considers products that have a presentation. This should prevent the issue where the minimum value is taken from a product without a presentation.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
17 | |
7 | |
7 | |
6 | |
5 |
User | Count |
---|---|
22 | |
10 | |
10 | |
9 | |
7 |