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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
RaulPBI
Helper II
Helper II

Using a parameter on a specific item of expense or income in a budget

Hi all,
I need some help . I am building a comparative scenario between actual values and budget, and want to apply a percentage of variation on a specific item of my budget (it can be one or more items at the same time that can change).
 
I have just definied a parameter that I have applied to my measure "budget". The thing is that if I change the % on the parameter this apply on the wholle item's budget. 

Do you know a DAX's technical to isolate the effect of the parameter's variation?

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @RaulPBI,

 

Please provide sample data and show us the expected result.

How to Get Your Question Answered Quickly

 

Regards,

Yuliana  Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sorry for that. Attached you can find what I want to do. If I choose a item for example "gastos de personal" and a percentage of variation, 3% in the example, I need that my budget (presupuesto) change only a 3% in that item, not in the whole.

 

tempsnip.png
I attached my DAX measures chain too, in order to explain better the issue. Hope it helps.

 

(ACTUAL OR REAL DATA)

Medida a mostrar =
IF (
HASONEVALUE (
Medidas[Medidas]);
SWITCH (
VALUES (
Medidas[Medidas]);"1 Importe neto de la cifra de negocios"; [1 Importe neto de la cifra de negocios];
"4 Aprovisionamientos" ; [4 Aprovisionamientos] ;
"5 Otros ingresos de explotación" ; [5 Otros ingresos de explotación] ;
"6 Gastos de personal" ; [6 Gastos de personal] ;
"7 Otros gastos de explotación" ; [7 Otros gastos de explotación] ;
"8 Amortización del inmovilizado" ; [8 Amortización del inmovilizado] ;
"9 Imputación subvenc inmovilizado no financiero y otras" ; [9 Imputación subvenc inmovilizado no financiero y otras] ;
"10 Exceso de provisiones" ; [10 Exceso de provisiones];
"11 Deterioro de resultado por enajenaciones del inmovilizado" ; [11 Deterioro de resultado por enajenaciones del inmovilizado];
"12 Otros resultados" ; [12 Otros resultados] ;
"A) RESULTADO DE EXPLOTACIÓN (1+2+3+4+5+6+7+8+9+10+11+12)" ; [A) RESULTADO DE EXPLOTACIÓN (1+2+3+4+5+6+7+8+9+10+11+12)] ;
"13 Ingresos financieros" ; [13 Ingresos financieros] ;
"14 Gastos financieros" ; [14 Gastos financieros] ;
"B) RESULTADO FINANCIERO (13+14+15+16+17)" ; [B) RESULTADO FINANCIERO (13+14+15+16+17)] ;
"C) RESULTADO ANTES DE IMPUESTOS (A+B)" ; [C) RESULTADO ANTES DE IMPUESTOS (A+B)] ;
"18 Impuesto sobre beneficios" ; [18 Impuesto sobre beneficios] ;
"D) RESULTADO DEL EJERCICIO (C+18)" ; [D) RESULTADO DEL EJERCICIO (C+18)] ;
"EBITDA" ; [EBITDA]
)
)
 
(BUDGET)


Asignación presupuestaria =
VAR
DiasEnElContextoDeFecha = COUNTROWS ( Calendario )
// Encuentra cuantos días hay en un contexto de fecha
VAR
DiasTranscurridosPeriodo = CALCULATE ( COUNTROWS ( Calendario ) ; ALLEXCEPT ( Calendario ; Calendario[Año]))
//Encuentra cuantos días hay en cada año
VAR
TotalPresupuesto = [Total Presupuesto]
//Suma el total del presupuesto, alterado por el contexto de la división, norma de reparto o proyecto
RETURN
( DiasEnElContextoDeFecha / DiasTranscurridosPeriodo ) * TotalPresupuesto
//Devuelve la asignación presupuestaria sobre un contexto de fecha determinado



Asig Presup Nivel Proyecto =
IF (
ISFILTERED(Apuntes[NombreProyecto]);
CALCULATE([Asignación presupuestaria];
USERELATIONSHIP(Proyectos[Proyecto];Presupuestos[Proyecto]));
[Asignación presupuestaria])
 
 
(COMPARATIVE)
Diff. Actual Vs Presupuesto = [Medida a mostrar] - [Asig Presup Nivel Proyecto]


Hi @RaulPBI,

 

As there existing many table, column and measure names in the provided formulas in Spanish, I could not understand them well.  Based on my assumption, you want to make the result of [Asignación presupuestaria] to be changed dynamically depending on slicer selection, right?

 

Maybe you can create an extra mesaure similar to:

Final Budget =
IF (
    SELECTEDVALUE ( Medidas[Medidas] ) = SELECTEDVALUE ( Apuntes[NombreProyecto] ),
    [Asignación presupuestaria],
    [AnotherBudgetMeasure]
)

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It is not what I need. What I want is that the combination between parameter (%variacion presupuestaria) and a selected "medida" affects only to that "medida" not the whole budget as you can see in the 1st image (after parameter). The 2nd one shows the situation without parameter which is the same as normal comparison with budget (without paratemer scenarios).

 

Hope it helps to clarify.

 

 

 

 

 

 

 

 

after paramrter.PNGbefore parameter.PNG

 

 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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