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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
RaghdahIsmael
Helper I
Helper I

Using calculated Columns instead of Measures

Hello DAX team,

 

Im trying to reuse the below both measures but as calculated columns that I'm trying to create in power query as Custom column

 

1.   # Deals in Rel =  count(DealsData[dealsNbr]) 

 

2.  # Deals-orig and curr are the same =  COUNTX(filter(DealsData, DealsData[ProdOfcr – first 2 characters] = DealsData[first 2 characters]), DealsData[dealsNbr]).

 

Intially, I created the first column to do the same job of measure 1 with the DAX in the below screenshot but it gave me an error then :  

 

RaghdahIsmael_0-1649100852938.png

 

 

the reason for creating these columns instead of measures so that i can use SUM or Count with those columns , because as we know we can't view SUM or COunt with measure but we can do so with Columns as the below screenshots :

 

RaghdahIsmael_1-1649101171875.png

 

RaghdahIsmael_2-1649101203829.png

 

 

To sum up, i need your support to creat columns by wrting suitable DAX that give me the same job of the above 2 measrures (1. , 2.)

 

 

thank you,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @RaghdahIsmael ,

 

Add two custom column as below. Then you can SUM or Count them in report view.

RicoZhou_0-1649316067773.png

RicoZhou_1-1649316076731.png

New Table looks like as below.

RicoZhou_3-1649316092077.png

Result is as below.

RicoZhou_4-1649316164029.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @RaghdahIsmael ,

 

Add two custom column as below. Then you can SUM or Count them in report view.

RicoZhou_0-1649316067773.png

RicoZhou_1-1649316076731.png

New Table looks like as below.

RicoZhou_3-1649316092077.png

Result is as below.

RicoZhou_4-1649316164029.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

"Rico Zhou" thank you indeed for your reponse and suggested solution much appreciated and yes it worked 🙂

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.