Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to count all negative numbers by rows and in total...but it doesn't work in total
Solved! Go to Solution.
@Nick_2510
Please try
Count of -ve =
SUMX (
CROSSJOIN ( VALUES ( 'Date'[Date] ), VALUES ( Data[Name] ) ),
IF ( [diff_AvSal_bal] < -1, 1, 0 )
)
@Nick_2510
Please try
Count of -ve =
SUMX (
CROSSJOIN ( VALUES ( 'Date'[Date] ), VALUES ( Data[Name] ) ),
IF ( [diff_AvSal_bal] < -1, 1, 0 )
)
Thx a lot! It works!
But now I need to add one option in IF constraction...
switch off name if name in a period - data for this in another table with colomns (Name, Start_period, End_Period)
Count of -ve =
@Nick_2510
Now its different. I need to see sample data of the two tables and the relationships between the three tables.
delist
data
relationships
other 2 tables are handbooks....Glossary - names of products and specifications, and Celendar(Date)
@Nick_2510
In your table visual please use the [Name] column from the 'delist' dimention table and not from the fact 'Data' table. Then you may try
Count of -ve =
SUMX (
CROSSJOIN ( VALUES ( 'Календарь'[Date] ), delist ),
IF (
[diff_AvSal_bal] > 0
|| 'Календарь'[Date] IN CALENDAR ( delist[Start_per], delist[End_per] ),
0,
1
)
)
But in table 'delist' are not all names...the main table is Data...all calculations and visualizations are made due to it...and Name I take from Glossary...
Can you share a sample file?
@Nick_2510
Sorry I was confused and replied to your other post
https://community.powerbi.com/t5/DAX-Commands-and-Tips/IF-Conditions/m-p/2512570#M69732
HI @tamerj1
It should be 0, because this names on this dates are in delist table (second condition)....(((
@tamerj1
No, I mean put 0 if name on this day is in delist OR diff_AvSal_bal > 0...but it takes 1...I tried to reverse conditions and got error
try this,
Negative val = SUMX(Negative,IF(Negative[Diff]<0,1,0))
This formula is not for measures
Hi @Nick_2510
Please try
Count of -ve =
SUMX ( VALUES ( Data[Name] ), CALCULATE ( IF ( [diff_AvSal_bal] < -1, 1, 0 ) ) )
Hi! The same result(
@Nick_2510
Do you have other active filters of the page or on the visual? any slicers? Any other table or other column invloved?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |