Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I need to count distinct values for each day in a period, but when I choose the period of interest, the DAX function DISTINCTCOUNT only works for the entire period. Example:
In this case, I want to return the sum of the values, but if the column Date is removed, the function apply to the entire period, returning a undesirable result:
I am using the following formula:
Vendedoras*dias = CALCULATE(DISTINCTCOUNT(Tabela_Consulta_de_250_gestao[Nome]),REMOVEFILTERS(Tabela_Consulta_de_250_gestao[Nome]))
Obs.: I am using the REMOVEFILTERS function because it is a tooltip, and I want to compare filtered results with unfiltered, so I believe that part is not revelant.
Excuse me for my English, but the forum is very poor on my language.
Thank you in advance.
Solved! Go to Solution.
@muriloczs , Try like
Vendedoras*dias = Sumx(Values(Tabela_Consulta_de_250_gestao[Date] ) , CALCULATE(DISTINCTCOUNT(Tabela_Consulta_de_250_gestao[Nome]),REMOVEFILTERS(Tabela_Consulta_de_250_gestao[Nome])))
@muriloczs , Try like
Vendedoras*dias = Sumx(Values(Tabela_Consulta_de_250_gestao[Date] ) , CALCULATE(DISTINCTCOUNT(Tabela_Consulta_de_250_gestao[Nome]),REMOVEFILTERS(Tabela_Consulta_de_250_gestao[Nome])))
Worked for me, thank you!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
42 |