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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
FabvE
Helper I
Helper I

Calculate answers per question

Hi@all,

 

I have a big dynamic report of Forms surveys which I need to visualize. The table is build like this:

FormIDFormNameOperationUserDate
ABCGreat SurveyCreatePeter2021-12-05
ABCGreat SurveyRespondAlex2021-12-05

XYZ

New ideasCreateBettina2021-12-14
XYZNew ideasRespondBettina2021-12-20
ABCGreat SurveyRespondSarah2022-01-06
XYZNew ideasRespondClaire2022-01-06
KLMOld surveyRespondSarah2022-01-26
XYZOld surveyRespondClaire2022-02-01
KLMOld surveyRespondAlex2022-02-02

 

Now I need to count the responses per survey (based on FormID not FormName, because names can be duplicate) but only if the survey is listed as created under Operation.

 

The final visualized table should look like this:

FormNameAnswers
Great Survey2
New ideas3

KLM should be skipped because there's no Create operation listed.

 

As bonus there should be a seperate  list with answers, where there's no Create operation for the survey in the whole table:

FormNameAnswers
Old Survey2

(this time KLM)

 

I already found this post but that didn't help.

 

Any ideas? 🙂

 

Best regards

6 REPLIES 6
Anonymous
Not applicable

Hi @FabvE,

You can try to use the following measure formula if it is suitable for your requirement:

formual =
VAR createidList =
    CALCULATETABLE (
        VALUES ( Table[FormID] ),
        FILTER ( ALLSELECTED ( Table ), [Operation] = Create )
    )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table[FormID] ) ),
        FILTER ( ALLSELECTED ( Table ), [FormID] IN createidList ),
        VALUES ( Table[FormName] )
    )

If the above does not help, can you please explain more detailed information to help us clear about the calculating conditions?

How to Get Your Question Answered Quickly  

Regards,
Xiaoxin Sheng

FabvE
Helper I
Helper I

No, I only need to count those surveys (FormIDs) which are listed with Create and Response. FormIDs without a create operation should be skipped.

Now I need to count the responses per survey (based on FormID not FormName, because names can be duplicate) but only if the survey is listed as created under Operation." 

 

This contradicts the sample output where you use Form Name.  Please make a choice.

 

 

Wouldn't it be possible to filter the list by "Operation -> created" and apply the FormID values from this list as a filter for the whole list? Then it should be just a counting of the FormIDs minus 1?

If this is possible, how is it done?

It is not clear to me what you are actually trying to achieve.

 

1. Please provide sanitized sample data that fully covers your issue. 
2. Please show the expected outcome based on the sample data you provided. 

lbendlin
Super User
Super User

"but only if the survey is listed as created under Operation."

 

Did you mean to write "Respond"  ?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.