Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
orghn
Helper I
Helper I

Error while filtering on slicer

Hi Everyone!

 

I have 2 tables, one with products and the other with laboratories. I need that both blank spaces have the value of the middle one (1514).

 

The measure is:

Precio_Mio = CALCULATE(MAX(PRECIOS_MENSUALES[PRECIO_ARS]),LABORATORIOS[DLABORATORIO]=SELECTEDVALUE(LABORATORIOS[DLABORATORIO]))
 
PRECIO_ARS is the price of that product and I have a Lab selected (the middle one) to get only that value. 

 

orghn_0-1643067514342.png

 

6 REPLIES 6
v-henryk-mstf
Community Support
Community Support

Hi @orghn ,

 

In the table you provided, unlink the Lab table from the Product table. Then try the following formula:

My_Price =
VAR sel_lab =
    SELECTEDVALUE ( Lab[Lab Name] )
RETURN
    CALCULATE (
        SUM ( 'Price'[Price] ),
        ALLEXCEPT ( 'Price', 'Price'[Month] ),
        sel_lab = 'Product'[LabName]
    )

vhenrykmstf_0-1643274859715.png

vhenrykmstf_1-1643274877139.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your feedback.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Syndicate_Admin @v-henryk-mstf . I attach my real file. https://www.dropbox.com/s/lb5cl6r4a152gvc/Sample%20Real.pbix?dl=0

 

Maybe this could help, I´m really stuck with this.

 

Thanks!

Hi @Syndicate_Admin Thanks for your reply. I can´t unlink the Lab table and the Product one because in my real file I need both. Is there any other solution?

VahidDM
Super User
Super User

Hi @orghn 

 

Can you post sample data as text and expected output?
Not enough information to go on;

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

Hi @VahidDM , I send you sample data and tables, I can´t share the file due to privacy.

orghn_2-1643114577917.png

 

Data:

Product 1 from Lab a price 10

Product 2 from Lab b price 15

Product 3 from Lab c price 20

 

I need to select a Lab in the slicer, for example Lab b and I need a table with an output in EACH ROW with value 15

orghn_1-1643114442617.png

this values in yellow should be 15

 

This is my dax:

Precio_Mio = CALCULATE(MAX(PRECIOS_MENSUALES[PRECIO_ARS]),LABORATORIOS[DLABORATORIO]=SELECTEDVALUE(LABORATORIOS[DLABORATORIO]))

 

Hi @VahidDM . I attach a sample file https://www.dropbox.com/s/okd4v27jqk1ddt0/Sample.pbix?dl=0 .

 

Hope it´s clearer now!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.