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
viralpatel21
Helper II
Helper II

Measure result showing 1 month ahead

Hi everyone,

 

I had a Total meausre where I am suming the total of "Gold Card" purchased. For example in February 5 member purchased this card (valued 5995 ea) which bring the total for Feb 29,975. But in my table the total for Feb is blank but the total for March is 29,975. Like so:

 

viralpatel21_0-1621265952566.png

These are the measure Used:  

Totalsubscription =
CALCULATE(
SUMX(au_subscriptionhistories, au_subscriptionhistories[SubscriptionAmountPaid]),
USERELATIONSHIP(FeeDate[Date],au_subscriptionhistories[au_paymentdate]))
 
SubscriptionAmountPaid measure is a bit complex but its just sums for different table: 
SubscriptionAmountPaid =
VAR SubHistoryAmount =
CALCULATE (
SUMX ( au_subscriptionhistories, au_subscriptionhistories[au_total] ),
FILTER ( au_subscriptionhistories, au_subscriptionhistories[Event_Final] = "Joining" )
)
VAR VoucherAmount =
SUMX ( au_subscriptions, au_subscriptions[au_value] )
VAR BlankVoucherAmount =
CALCULATE (
SUMX ( au_subscriptions, au_subscriptions[au_price] ),
FILTER ( au_subscriptions, au_subscriptions[au_code] <> BLANK() )
)
VAR SubscriptionPrice =
SUMX ( au_subscriptions, au_subscriptions[au_price] )
 
RETURN
IF (
AND ( COUNTX ( au_subscriptions, au_subscriptions[au_code] ) > 0, SUMX ( au_subscriptions, au_subscriptions[au_value] ) > 0 ),
VoucherAmount,
 
IF (
SubHistoryAmount = 0,
SubscriptionPrice,
SubHistoryAmount
)
)
// )

 

Hope you all can help me

 

Thanks

Viral

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @viralpatel21 

 

Is the result for only March ahead? Or is it the same for all months? I think your Totalsubscription measure should work normally. The problem is likely to be your SubscriptionAmountPaid measure, but I'm not sure about the structure of your model so I can't judge further. Could you please consdier sharing more details about it or a simple sample file without any sesentive information for further discussion?

 

 

 

Best Regards,
Zeon Zheng

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @viralpatel21 

 

Is the result for only March ahead? Or is it the same for all months? I think your Totalsubscription measure should work normally. The problem is likely to be your SubscriptionAmountPaid measure, but I'm not sure about the structure of your model so I can't judge further. Could you please consdier sharing more details about it or a simple sample file without any sesentive information for further discussion?

 

 

 

Best Regards,
Zeon Zheng

Apologies, The measure was correct. I was reading the data wrong in the table 🙂

 

Hi @v-angzheng-msft

 

The result is ahead for all months. Creating a sample file it abit complexed as there are several table and relationships connected but will try to create one.

 

thanks

viral

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!

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.