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 am trying to make a report in PowerBI that shows the status of files in a list. The rows in the dataset are being pushed into the table from a connector in Flow. So I want to show a file as Pending only if it hasn't later been Approved or Rejected.
Each file has a uniqie ID. My idea was to filter the Pending row if there is an exact match in the FileID column. In a PowerBI report, how can I only display the row that says Pending when there is not a duplicate number in FileID for Approve or Reject?
In the example below, I only want to show the Approve row for upload-demo.docx, the Reject row for test-send.xlsx, and the Pending row for export.site.txt. Please help!
FileID | Filename | Status |
5MFIYUS2 | upload_demo.docx | Approve |
5MFIYUS2 | upload_demo.docx | Pending |
M3R33DJL | test-send.xlsx | Pending |
M3R33DJL | test-send.xlsx | Reject |
CYFH25YP | export-site.txt | Pending |
You are going to need a flag column or measure along the lines of:
Flag Column =
VAR __Statuses = SELECTCOLUMNS(FILTER('Table',[FileID] = EARLIER([FileID]),[Status])
RETURN
SWITCH(TRUE(),
[Status] = "Approvied" || [Status] = "Rejected",1,
NOT("Approved" IN __Statuses) && NOT("Rejected" IN __Statuses),1,
0
)
Thank you for the code. Since this is a report coming from a streaming dataset, won't I be limited to just the one table 'RealTimeData'? PowerBI won't allow the table Statuses in the report with the table made from the streaming dataset. Apologies for the noob questions.
Anne
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 |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
84 | |
70 |