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
DavidGTMS
Helper I
Helper I

calculate social media - interactions/reactions

Hello,

 

I'm doing a social media report. The data I have, contains several facebook accounts, with id that differentiates each post. From the same post, I have a history of each update (comments, share, etc ..). The data is cumulative. The goal is to create measurements or columns or a new table, to calculate comments, share, etc. I want to show the calculations in a table and also in kpi.

 

I attach excel table as an example. The relationships to this table are with a time dimension, with the clients, with the accounts and with the platforms.

 

Thank you very much in advance.

 

PostIDCreateDateUpdatenameaccountplatformPostTextComments AccumulatedShares AccumulatedComments per MonthShares per Month
101/29/2018  8:00:0001/29/2018  10:00:00clientAclientA_1FacebookLorem upsum…10  
101/29/2018  8:00:0001/29/2018  14:00:00clientAclientA_1FacebookLorem upsum…31  
101/29/2018  8:00:0001/29/2018  18:00:00clientAclientA_1FacebookLorem upsum…51  
201/30/2018  9:00:0001/30/2018  11:00:00clientAclientA_1FacebookLorem upsum…10  
101/29/2018  8:00:0001/30/2018  10:00:00clientAclientA_1FacebookLorem upsum…52  
201/30/2018  9:00:0001/30/2018  14:00:00clientAclientA_1FacebookLorem upsum…5025  
101/29/2018  8:00:0001/30/2018  14:00:00clientAclientA_1FacebookLorem upsum…82  
101/29/2018  8:00:0001/30/2018  18:00:00clientAclientA_1FacebookLorem upsum…103  
101/29/2018  8:00:0001/31/2018  10:00:00clientAclientA_1FacebookLorem upsum…103  
201/30/2018  9:00:0001/31/2018  14:00:00clientAclientA_1FacebookLorem upsum…10030  
101/29/2018  8:00:0001/31/2018  14:00:00clientAclientA_1FacebookLorem upsum…118  
201/30/2018  9:00:0001/31/2018  18:00:00clientAclientA_1FacebookLorem upsum…1204012040
101/29/2018  8:00:0001/31/2018  18:00:00clientAclientA_1FacebookLorem upsum…118118
201/30/2018  9:00:0002/15/2018  10:00:00clientAclientA_1FacebookLorem upsum…200508010
101/29/2018  8:00:0002/17/2018  10:00:00clientAclientA_1FacebookLorem upsum…121022
201/30/2018  9:00:0003/15/2018  9:00:00clientAclientA_1FacebookLorem upsum…3006010010
201/30/2018  9:00:0004/15/2018  9:00:00clientAclientA_1FacebookLorem upsum…4507515015
304/25/2018 9:00:0004/25/2018 12:00:00clientAclientA_1FacebookLorem upsum…3131
201/30/2018  9:00:0005/15/2018  9:00:00clientAclientA_1FacebookLorem upsum…5001005025
201/30/2018  9:00:0006/15/2018  9:00:00clientAclientA_1FacebookLorem upsum…60012010020
201/30/2018  9:00:0007/15/2018  9:00:00clientAclientA_1FacebookLorem upsum…80013520015
6 REPLIES 6
v-qiuyu-msft
Community Support
Community Support

Hi @DavidGTMS,

 

If I understand correctly, you would like to calculate below results, right? 

1. last month Comments Accumulated

2. last month Share accumulated 

3. difference between last month Comments Accumulated and current month Comments Accumulated 

4. difference between last month Share Accumulated and current month Share Accumulated 

 

As the sample data you provided in your initial post contains moth January and April, it hard to test it. To return previous month result, you could try PREVIOUSMONTH Function within a measure.

 

Reference:

https://community.powerbi.com/t5/Desktop/PREVIOUSMONTH/m-p/13313

 

Best Regards,
Qiuyun Yu 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi,

 

I tried "previous ....", but it gave me errors. Regarding the months, I have passed data for the months of January, February, March, April, May, June and July. Not only January and April.

 

The complexity, is that the total of the month is false, since it is an accumulated one. Really, it would have to be deducted from the total of the month the total of the last month.

 

If you do not see a solution, Thanks anyway.

 

hi,

 

What I'm looking to do is the following, check the accumulated for each post of the current month and subtract the accumulated from that post from last month if you have it. And in that comparison, it may be the case, that last month's post are no longer active in the current month, so their values for the last month should not be subtracted in the current month.

 

Attached screenshot of the error I suffer.

 

image.png

 

 

DavidGTMS
Helper I
Helper I

Hi,

 

Maybe there is some possibility to perform a summarize to filter the table, and filter only the most recent row of each end of the month. Thus, in the new table it would be easier to make measurements or calculated columns.

 

But neither is that previous step.

 

Thank you

DavidGTMS
Helper I
Helper I

I want to show the data in a table. The rows will have the columns "PostID", "CreateDate", "Name", "Account", "PostText" and the measures or columns calculated from the Comments and Share of the accumulated of the last month, of the accumulated of this month and of the difference with the previous month (current). I also want to show these 3 latest data, in some kpi cards and in a donut.

 

Thank you so much.

 

I attach examples of how I want to show the data

 

image.pngimage.pngimage.png

v-qiuyu-msft
Community Support
Community Support

Hi @DavidGTMS,

 

Regarding the sample data you shared, what's the desired result you want? 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.