cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
viralpatel21
Helper I
Helper I

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

View solution in original post

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors