Forum Discussion
Create table filtered with several considerations
- Anonymous3 years ago
Hi Laocsulak ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create 2 measures.
_DUE = IF(MAX('Table 1'[status])="DUE",0,1)Measure = var _thismonth=TODAY() var _lastmonth=EDATE(TODAY(),-1) var _minbuy=CALCULATE(MIN('Table 1'[created_date]),FILTER(ALL('Table 1'),'Table 1'[user]=SELECTEDVALUE('Table 1'[user])&&'Table 1'[installment]=MINX(ALLSELECTED('Table 1'),'Table 1'[installment]))) VAR _DUE=MINX(FILTER(ALLSELECTED('Table 1'),'Table 1'[user]=SELECTEDVALUE('Table 1'[user])),[_DUE]) VAR _NEWBUY=IF(_minbuy>=_lastmonth&&_minbuy<=_thismonth,BLANK(),1) RETURN IF(_DUE=0,BLANK(),IF(_NEWBUY=0,BLANK(),1))Then you can create a new table.
Table = FILTER(SUMMARIZE('Table 1','Table 1'[user],'Table 1'[order_id],'Table 1'[installment],"aa",[Measure]),[Measure]<>BLANK())How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Laocsulak ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create 2 measures.
_DUE = IF(MAX('Table 1'[status])="DUE",0,1)Measure = var _thismonth=TODAY()
var _lastmonth=EDATE(TODAY(),-1)
var _minbuy=CALCULATE(MIN('Table 1'[created_date]),FILTER(ALL('Table 1'),'Table 1'[user]=SELECTEDVALUE('Table 1'[user])&&'Table 1'[installment]=MINX(ALLSELECTED('Table 1'),'Table 1'[installment])))
VAR _DUE=MINX(FILTER(ALLSELECTED('Table 1'),'Table 1'[user]=SELECTEDVALUE('Table 1'[user])),[_DUE])
VAR _NEWBUY=IF(_minbuy>=_lastmonth&&_minbuy<=_thismonth,BLANK(),1)
RETURN
IF(_DUE=0,BLANK(),IF(_NEWBUY=0,BLANK(),1))
Then you can create a new table.
Table = FILTER(SUMMARIZE('Table 1','Table 1'[user],'Table 1'[order_id],'Table 1'[installment],"aa",[Measure]),[Measure]<>BLANK())
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.