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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate only if value available in column

Hi All,

 

In my table i have columns like 1.Quantiy, 2. Price, 3. Payment Date. For some values of price, i dont have payment Dates. Now, i want to calculate Total sales=[Quantity]*[Price], only for available Payment Dates and exclude when payment date value is not available for that particular price column value. Do anyone have idea on how to do this?

 

Looking for sooner solution.

 

TIA

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I create data to reproduce your scenario.

Table:

c1.png

 

Then you may create a measure as follows.

 

Total Sales = 

SUMX(
        FILTER(
            'Table',
            'Table'[Payment Date]<>BLANK()
        ),
        'Table'[Quantity]*'Table'[Price]
)

 

 

Result:

c2.png

Best Regards

Allan

 

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

amitchandak
Super User
Super User

Try

//new Measure
sumx(filter(table,not(isblank(table[price])),table[Quantity]*table[Price])
Or
calculate(sumx(table,table[Quantity]*table[Price]),not(isblank(table[price])))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

If(isblank(table[date])=TRUE,0,table[quntity]*table[price])


Thanks,
Pravin

If it resolves your problem mark it as a solution.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors