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
HITEK
New Member

COUNTROW that the Date is less then and Equal the current table row Date value then the current

HITEK_0-1710973890949.png


It only filters the the records that are eqaul but not the one that are earlier ( less than ) 

5 REPLIES 5
AmadouSow_2024
New Member

Bonjour, 

Je voudrais votre aide, je travail sur un rapport.

Je voudrais compte les occurences des memes valeurs qui se trouvent dans 4 differentes colonnes.

Ex : 

Santé = CALCULATE(COUNTROWS(DataBase), DataBase[Réponse priorité 1]= "Santé"). Ça marche bien pour cet exemple, j'ai le nombre de fois où il y a Santé dans la colonne [Réponse priorité 1] de la Table "DataBase".

 

Maintenant je voudrais ajouter dans la même formule les colonnes [Réponse priorité 2] ; [Réponse priorité 3] et [Réponse priorité 4] pour avoir le nombre de fois où il y a Santé dans les 4 colonnes, sur une même carte dans mon rapport. 

Apres je pourrais faire la mesure pour les autres types de réponse notamment L'Appui psychosocial ...

Anonymous
Not applicable

Hi @HITEK 

 

First of all, thanks to @Dangar332 for your timely response.

 

Here is my suggestion.

 

Sometimes there is a relationship between the two tables can cause this situation, check whether there is a relationship between "Dates" and "Sheet1" tables, if the relationship is not necessary, please delete it and then check whether the formula works properly.

 

Best Regards,
Yulia Xu

 

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

Tks Yulia, unfrotunately It's not giving me the correct results, it omits nay records from previouse dates, < or > is taken into account, actualy retunrs no results when they are used on there own !

 

Dangar332
Super User
Super User

hi, @HITEK 

 

try to add allexcept(dates,dates[date]) inside calculate

like

calculate(
   countrows('sheet1'),
   sheet[atd]<=max(dates[date]),
   allexcept(dates[date])
)

Thanks Dangar 

Unfrotunately that din;t do the trick, in the Dax it actualy dioesn;t even recognize any results if the < or > is used to filter and count. 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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