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
Anonymous
Not applicable

measure +1 to a index value

Hi experts

 

I have the next issue i have 2 tables A and B in table A have a row called SALDO TOTAL wich have a measure (sum) and B have another one call SALDO PENDIENTE(wich is another sum) i have created a index column to represent the months  of the year in B (1 to 12)

because i need to create the follow measure

 

SALDO COBRADO(THIS MONTH) = SALDO TOTAL(THIS MONTH) - SALDO PENDIENTE(MONTH +1)

But i needed to diferenciate by the index number i created(i don´t have a DATE column in the DB)

so it will be like .
SALDO COBRADO ENERO(JANUARY=1) = SALDO TOTAL ENERO(JANUARY=1) - SALDO PENDIENTE(FEBRUARY=2)

I know this would be better if i would use the intelligence of time of dax but soon i will be able to make changes to my DB of the work 😃 

Greetings from Perú.

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

Please provide sample data and desired result to help us better understand your requirement.

How to Get Your Question Answered Quickly

 

Best 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.
Anonymous
Not applicable

@v-yulgu-msft @TomMartens 

hi i upload the bd with maskered data
https://drive.google.com/open?id=1dO_ywkjIkXbPHi0zTWXSZoG0URV3rh-f

as i post it i need a new measure that do the follow

lastimage.png

thank u very much.

TomMartens
Super User
Super User

Hey,

can you please provide a screenshot of your tables.
I have to admit that I have difficulties to understand how your tables look like.

I assume that both of your tables are not related, is my assumption correct?

Regards,
Tom


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

hi, @TomMartens  i actually have some issue about confidenciality
but i´ll try to put images and the measures i have thanx 4 the attention
this is the structure of the data (i know is a mess but they really not know about power bi or DB stuff)

table2.png
from this 2 tables i have the issue where

"facturado" is a measure created using sum(importe total) (table fact_x_docpago)

then i have another one created by the second table called "pagopendiente" another sum but using

"saldo_pendiente" and filter by "estadofactura" wich in this case is for the value "pendiente" so allways 
facturado > saldo_pendiente then in the same table i created a column called MES_NUMERO (MONTH_NUMBER) to use as a index ENERO(JANUARY)=1, FEBRERO(FEBRUARY) = 2 , MARZO(MARCH) = 3.... and so.

So i need to create a UNIQUE measure that makes follows

COBRADO(ENERO) = FACTURADO(ENERO) - PENDIENTE(FEBRERO) 

COBRADO(FEBRERO) = FACTURADO(FEBRERO) - PENDIENTE(MARZO) 

so like it show in my visual this should show

ENERO_COBRADO = 822K - 555K =267K And so for the next months wich all are indexed

 

thanks for the attention
tabla1.png

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.