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
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
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.