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

TABLE GRAPHIC NOT SUM TOTAL WITH MORE THAN ONE VALUE

Hi everyone,

 

I have 2 tables INFO Table and FINANCE_TABLE) the relation between both is the INFO_CODE.

 

I need to calculate the actual (FINANCE_TABLE) by ANNV_DATE (INFO Table) just during the Previous year .

 

I did the measure which show me the value per INFO_CODE correct. However, I`m trying to sum all actual transaction using graphic
table but the measure just works when I select one value.

 

This is the measure and the example that I`m using and one example of it :

 

MEASURE =
VAR DATE1 = IF ( HASONEVALUE(INFO[PREVIOSANNDAY]),VALUES((INFO[PREVIOSANNDAY]) )
VAR StartDate = IF ( HASONEVALUE(INFO[STARTANNDATE]),VALUES(INFO[STARTANNDATE]))
VAR ID = IF(HASONEVALUE(INFO[CODE]), VALUES ( INFO[CODE] ) )
VAR Result =
SUMX(
FILTER(
FINANCE_TABLE, FINANCE_TABLE[DATE] >=StartDate
&& FINANCIAL_TABLE[TRAN_DATE] <= DATE1
&& FINANCIAL_TABLE[INFO_CODE] = ID ),
[ACTUAL_VALUE])
RETURN
Result


Example :


INFO_CODE |ANNV_DATE |STARTANNDATE | PREVIOSANNDAY| ACTUAL_VALUE
E45/1234     |28/02/2019   | 28/02/2018        | 27/02/2019           |86,617.22
E45/4567     |24/01/2019   | 24/01/2018        | 23/06/2019           |84,727.55

 

Where INFO_CODE is from FINANCIAL_TABLE
Where ANNV_DATE is from INFO Table
Where STARTANNDATE is from INFO Table
Where PREVIOSANNDAY is from INFO Table
Where ACTUAL_VALUE is a mesuare that sum the transactions from FINANCIAL_TABLE


If I select one INFO_CODE for example E45/1234 the sum on the table show me 86,617.22 which is correct,
but if I select more than one for instance E45/1234 and E45/4567 the table dont sum.

I expected that the table show me all the sum of all INFO_CODE, on this example I expected the total of  INFO_CODE 171,344.77 which are the result for the INFO_CODE  E45/1234 and E45/4567

 

Can you please help me?

Thanks

1 ACCEPTED SOLUTION

Hi,

Try this measure

=SUMX(VALUES(FINANCIAL_TABLE[INFO_CODE]),[Actual_value])

If this does not work, then i will need your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share some data, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur I updated the information and included an example. Unfortunately I cant share the pbx because is a confidencial data. Can you please help me? I`ve tried a lot of functions, but I didnt get a correct result, just works if I select one value.Thank you so much

Hi,

Try this measure

=SUMX(VALUES(FINANCIAL_TABLE[INFO_CODE]),[Actual_value])

If this does not work, then i will need your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur it works \0/ 
I just create another measure using the sum of the measure that I mentioned before 

 

=SUMX(VALUES(FINANCIAL_TABLE[INFO_CODE]),[MEASURE ])

 

Thank you so much for your help. 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.