Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |