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.
Hi guys,
I have the following table (it contains the measure 'Pendiente de cobro'):
And I would like to obtain the following one:
The main problem is that the table calendar 'T_Calendar' and the data table 'T_FacturacionExpedienteResumida' are not directly relationated, so I used the function Userelationship, as you can see:
The measure is the following one:
Pendiente de cobro =
Var Facturado = CALCULATE(SUM(T_FACTURACIONEXPEDIENTERESUMIDA[TOTALAPAGAR]);T_FACTURACIONEXPEDIENTERESUMIDA[DIASSINCOBRAR]>0;USERELATIONSHIP(T_CALENDARIO[Fecha];T_FACTURACIONEXPEDIENTERESUMIDA[FECHAFACTURA]))
Var Cobrado = CALCULATE(SUM(T_FACTURACIONEXPEDIENTERESUMIDA[ENTRADA]);T_FACTURACIONEXPEDIENTERESUMIDA[DIASSINCOBRAR]>0;USERELATIONSHIP(T_CALENDARIO[Fecha];T_FACTURACIONEXPEDIENTERESUMIDA[FECHAFACTURA]))
Var PendienteCobro = Facturado-Cobrado
Return
PendienteCobro
How can I change it to get the cumulative values?
Thanks in advance.
Solved! Go to Solution.
Hi guys,
I have solved the problem.
The measure I need to introduce is:
Hi @VijayP
Thank you for your answer but it does not work as I expected.
I made some changes:
1. Put the relationship as inactive because I need to have it like this.
2. Create a new measure called 'Test 4' which gives the following results:
The result for 2019 is working correctly, but it is not the case for 2017 and 2018, because the results should be the following ones:
I think the problem is that the measure is not applying correctly the maximum date for each year (the part I put in bold):
The link to the file is https://www.dropbox.com/s/kip4r60nztzkzmc/Prueba%20Power%20BI.pbix?dl=0
Thanks in advance
Regards
Hi guys,
I have solved the problem.
The measure I need to introduce is:
Look at the Formula for TEST 3 to get your solution
PBIX Attached
Proud to be a Super User!
Sample Data would help to give more clear solution. Appreciate Your Kudos!
Proud to be a Super User!
Hi @VijayP,
I send you a sample data (this is not the original one, which is much bigger), so I need to keep the not activated relationship between both tables.
The link is https://www.dropbox.com/s/kip4r60nztzkzmc/Prueba%20Power%20BI.pbix?dl=0
Thanks in advance.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |