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

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.

Reply
Anonymous
Not applicable

Question with measure

Hi All,

 

I'm going to try to explain my situation because is a little bit complicate xD.

 

I have a "master" excel file with some data like this:

excelmaster.PNG

 

In this excel we have some columns like location code, name of location and the rest of the columns are sales amount and % of

discount depending of the quantity of the sales amount.

 

Then I have a dashboard with a table like this:

tablaguay.PNG

In this table yellow is name of client , red is sales amout and blue is the %discont depending the total sales amount.

 

The question is i want to change for one percentaje in excel file and that automactly applys to this table. The measure that I'm using to extract the % is:

 

Banda = 

VAR _banda1 = MAX(Farmacias[banda1])
VAR _banda2 = MAX(Farmacias[banda2])
VAR _banda3 = MAX(Farmacias[banda3])
VAR _banda4 = MAX(Farmacias[banda4])
VAR _banda5 = MAX(Farmacias[banda5])
VAR _banda1a = MAX(Farmacias[%banda1])
VAR _banda2a = MAX(Farmacias[%banda2])
VAR _banda3a = MAX(Farmacias[%banda3])
VAR _banda4a = MAX(Farmacias[%banda4])
VAR _banda5a = MAX(Farmacias[%banda5])
VAR _banda6a = MAX(Farmacias[%banda6])
RETURN

SWITCH(TRUE();
             ([sumcantidad]> 0 && [sumcantidad]<=_banda1); _banda1a;
             ([sumcantidad]>_banda1 && [sumcantidad]<=_banda2); _banda2a;
             ([sumcantidad]>_banda2 && [sumcantidad]<=_banda3); _banda3a;
             ([sumcantidad]>_banda3 && [sumcantidad]<=_banda4); _banda4a;
             ([sumcantidad]>_banda4 && [sumcantidad]<=_banda5); _banda5a;
             ([sumcantidad]>_banda5); _banda6a;
            0
            )

The problem here is the MAX of the variable, because for example if I change a number in one row but depending the of the number is taking the MAX. I don't know if is possible to access directy to a row , not to column.

 

Sorry for the explanation, really complicate to me explain this topic 😞

 

 

2 REPLIES 2
Anonymous
Not applicable

Dear cromero,

 

I think, your question is incompleted one. Can you please brief ellaborately?

 

Regards,

Pradeep

Anonymous
Not applicable

Yes , sorry was a mistake now you have more information 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.