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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rrk92
Regular Visitor

Need to calculate total number of days posted by feed

My table has : Feed_pid , Job_id, Api_time

in matrix view

rows feed_pid

column : Api_time

values : distinctcount(job_id)

now i want to add one column to add beside feed_pid 

total_days: 

slicer : Api_time i converted to date 

i used total_days= calculate(distinctcount(Api_time) , filter(Api_time))

But in my matrix i want to place this total_days beside feed_pid I can't do it because it's a measure and if I place it in the values it is giving me 1 for each date but it should give total fixed value for that feed.

please try to help and

thanks for the support.

 

4 REPLIES 4
rrk92
Regular Visitor

but if I apply api slicer the total should come based on that api slicer?

now it's giving me complete total

but i need based on slicer selection

when i added api time in the allexcept it is giving me 1 for the total ?

Anonymous
Not applicable

Hi, @rrk92 

 

Can you provide some of the sample data and the output you expect? Please remove any sensitive data in advance.

 

Best Regards,

Community Support Team _Charlotte

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

Kedar_Pande
Super User
Super User

Create a Calculated Column:

Total_Days_Column = 
CALCULATE(
DISTINCTCOUNT('YourTable'[Api_time]),
ALLEXCEPT('YourTable', 'YourTable'[feed_pid])
)

Now, place this Total_Days_Column beside feed_pid in the Rows section of your matrix. This way, you’ll get a fixed distinct count of Api_time for each feed_pid.


If this helped, a Kudos 👍 or Solution mark would be great!🎉
Cheers,
Kedar Pande
Connect on LinkedIn

It's giving me total number 

but i have one api date slicer 

based on that api slicer total value should come, in the allexcept if i add api date it's giving me total as 1 

how to correct it?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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