The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello All,
How I can replace Total column with countif condition (say >36000 for last 8 days) in below matrix visual.
I tried by creating other measure for same count if condition and added in visual but it is giving value against every date and that I don't want. I need just same matrix (1st) with Count if condition instead of total column.
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
I changed a condition to implement last three days sales amount, but I hope you can change the condition based on your business logic.
expected result sales: =
VAR _lastdate =
MAXX ( SUMMARIZE ( sales, 'calendar'[Date] ), 'calendar'[Date] )
VAR _lastthreedays =
FILTER (
ALL ( 'calendar' ),
'calendar'[Date] <= _lastdate
&& 'calendar'[Date] >= _lastdate - 2
)
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( 'calendar'[Date] ), SUM ( sales[sales] ),
CALCULATE ( SUM ( sales[sales] ), _lastthreedays )
)
@Jihwan_Kim
How we can filter out with item say >5 value on any specific date (say 5/31) which show those rows only with your shared calculation.
Actually when I'm filtering any greater than value than its only putting the blank value in columns. But I need it to show those items rows only when condition meets for selected date, rest all should be hidden.
Hi,
Sorry that it is a little bit difficult for me to understand your question.
Please provide your sample pbix file's link together with how your expected outcome looks like.
It will help for me to understand more clearly.
Thank you.
Hi @Jihwan_Kim
I need the data in this way, like when i filter value on date (say 6/4/2024) with greater than value 36000 then its showing those rows only , this i did in excel.
But in power BI, It only replace with blank rows only.[Say matrix 2 from PB]
Hi @gujralh ,
I think one of the misconceptions you have is that in Power BI Desktop, whether you select Table view or Matrix view, as long as there is a value for the current row, then it is also not possible to hide certain rows like Excel will.
In other words, if you want to hide the row, it will only be visible in Visual if it does not have any value. The following screenshot is an example you can refer to.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
I changed a condition to implement last three days sales amount, but I hope you can change the condition based on your business logic.
expected result sales: =
VAR _lastdate =
MAXX ( SUMMARIZE ( sales, 'calendar'[Date] ), 'calendar'[Date] )
VAR _lastthreedays =
FILTER (
ALL ( 'calendar' ),
'calendar'[Date] <= _lastdate
&& 'calendar'[Date] >= _lastdate - 2
)
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( 'calendar'[Date] ), SUM ( sales[sales] ),
CALCULATE ( SUM ( sales[sales] ), _lastthreedays )
)
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
13 | |
10 | |
10 | |
9 |