March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I’m having trouble to sum totals of subcategory
I have two tables.
1. A table that defines unique FaceBook pages names (repository)[Page] and the name of the person responsible for the page(repository)[RESP CONTENT]
repository
2. A table of the number of likes(FaceBook)[Likes] and followers(FaceBook)[Followers] per week (FaceBook)[Date]. The join with the (repository)table is done with the (FaceBook)[Page]
What I am expecting for [Community] are results like:
RESP CONTENT | Last Likes | Last Followers | Likes Rank | Followers Rank | Community |
- RESP1 | 220 | 450 | 5 | ||
P1 | 70 | 100 | 2 | 2 | 2 |
P2 | 150 | 350 | 3 | 3 | 3 |
- RESP2 | 50 | 80 | 1 | ||
P3 | 50 | 80 | 1 | 1 | 1 |
... | .... | .... | .... | ..... | ..... |
Total | 270 | 490 | 6 |
With :
for community measure SUMX can't give me the right result !!
I try :
SUMX(values(repository[Page]), DIVIDE([Likes Rank] + [Followers Rank],2))
SUMX(allselected(repository[Page]), DIVIDE([Likes Rank] + [Followers Rank],2))
nothing works!
Please, any help?
Thank's in advance
Solved! Go to Solution.
Hi, @SoufTC
Try measures as follows:
Likes Rank =
var _t=FIlter(ALL('repository'),[Last Likes]<>BLANK())
var _rank=
RANKX(_t,
CALCULATE([Last Likes]),,ASC,Dense)
return IF([Last Likes]<>BLANK()&&HASONEVALUE(repository[Page]),_rank)
Followers Rank =
var _t=FIlter(ALL('repository'),[Last Followers]<>BLANK())
var _rank=
RANKX(_t,
CALCULATE([Last Followers]),,ASC,Dense)
return IF([Last Followers]<>BLANK()&&HASONEVALUE(repository[Page]),_rank)
COMMUNITY =
SUMX(ADDCOLUMNS('repository',"_last rank",[Likes Rank],"_followers rank",[Followers Rank]),DIVIDE([_last rank]+[_followers rank],2))
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @SoufTC
From what I've got, the last follow on P3 should be 80.
Based on the information above, I create the community measure easily as follows:
COMMUNITY =
([Last Followers]+[Last Likes])/2
this seems to work fine.
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-angzheng-msft thank you for your help ! but I made a mistake in the results table (I corrected it) I'm trying to calculate [community] using the rank like this : COMMUNITY = ([Likes Rank] + [Followers Rank])/2 ; but unfortunately I can't get the right total
Hi, @SoufTC
Try measures as follows:
Likes Rank =
var _t=FIlter(ALL('repository'),[Last Likes]<>BLANK())
var _rank=
RANKX(_t,
CALCULATE([Last Likes]),,ASC,Dense)
return IF([Last Likes]<>BLANK()&&HASONEVALUE(repository[Page]),_rank)
Followers Rank =
var _t=FIlter(ALL('repository'),[Last Followers]<>BLANK())
var _rank=
RANKX(_t,
CALCULATE([Last Followers]),,ASC,Dense)
return IF([Last Followers]<>BLANK()&&HASONEVALUE(repository[Page]),_rank)
COMMUNITY =
SUMX(ADDCOLUMNS('repository',"_last rank",[Likes Rank],"_followers rank",[Followers Rank]),DIVIDE([_last rank]+[_followers rank],2))
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
at is the code for [Community] & [Evolution])?
You could try the following measure:
CM = SUMX(Table1, [Score])
Proud to be a Super User!
Paul on Linkedin.
It would actually help if you provided sample non-confidential data (not images - we can't work on images...) and a depiction of the expected result.
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown i just changed everything tell me if it is clear enough thank you in advance for your help
I just changed my post thanks
You could try the following measure:
CM = SUMX(Table1, [Score])
Proud to be a Super User!
Paul on Linkedin.
What is the code for [score]?
Proud to be a Super User!
Paul on Linkedin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |