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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Pivot Table Target Measure

Hi guys... I need your help with a measure in Pivot Table with Excel.

 

My goal is to have a measure (DisplayTotalWeeks) based on qty of "SemanaMes". In the case, it must return 9 like the example below.

Something like that:

 

Criada em (Month) SemanaMes Qty Atividade DisplayTotalWeeks

abr14469
abr2119
abr319
abr439
abr519
mai15249
mai27019
mai319
mai429
Grand Total 16909

 

I have stressed ChatGPT, but it doesn't give me what I'm looking for.

As an example, I have try this from GPT:
TotalUniqueWeeks := COUNTROWS(SUMMARIZE('YourTable', 'YourTable'[SemanaMes]))
DisplayTotalWeeks := CALCULATE([TotalUniqueWeeks], ALL('YourTable'))
It doesn't return 9, that what I was expecting.

So, you are my last hope.

4 REPLIES 4
DimaMD
Solution Sage
Solution Sage

@Anonymous  Hi, you need to add another column to the TotalUniqueWeeks measure, Is this your desired outcome?

DimaMD_0-1716967283722.png

 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: [email protected]
Anonymous
Not applicable

Hi @DimaMD ,

 

I have had try that, but I got this one:


Criada em (Month) | SemanaMes | Qty Atividade | measure 2

abr14465
abr2115
abr315
abr435
abr515
mai15245
mai27015
mai315
mai425

Grand Total 16905

Maybe the problem is here on calculated column:

=COUNTROWS( SUMMARIZE(export_sensedata_atividades_2024_05_13;export_sensedata_atividades_2024_05_13[SemanaMes]))

teste11234_0-1716989260639.png

 

Before I forget: Slava Ukraini!!!

@Anonymous Hi, try it DAX, add in sumarize colum "Criada em (Month)"

=COUNTROWS( 
     SUMMARIZE( 
          export_sensedata_atividades_2024_05_13;  
  export_sensedata_atividades_2024_05_13[SemanaMes];
export_sensedata_atividades_2024_05_13[Criada em (Month)]
 )
)

 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: [email protected]
Anonymous
Not applicable

Hi Dima,

 

I have try this before, and I believe that we are close because the result.

Criada em (Month) | SemanaMes | Qty Atividade | measure 2

abr144610
abr21110
abr3110
abr4310
abr5110
mai152410
mai270110
mai3110
mai4210

Grand Total 16905

 

Maybe on the measure now, because it must consider what is showed.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.