Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.