topic Re: Matrix table with dates for two related tables in Desktop
https://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1838870#M711756
<P>Thank you for your input. Perhaps i did not explain it correctly.</P><P>Since both certificates and surveys follow the "start window/due date/end window" pattern i wanted to create 3 such columns and below those, the corresponding dates would appear (where applicable).</P><P>The Rows would be</P><P> Certificate number</P><P> Survey</P><P> </P><P>and their corresponding dates would appear under the columns (or blank if n/a)</P><P> </P><P>So, i created a MIN measure as per your advise for all 6 dates and now i need 3 measures i guess (start/due/end) that would display the appropriate date measure of the 6 in the corresponding row. I Think that maybe a SWITCH measure is appropriate? Anyone to assist?</P><P> </P>Thu, 13 May 2021 17:18:13 GMTIoniaman2021-05-13T17:18:13ZMatrix table with dates for two related tables
https://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1836807#M711184
<P>Hello i would really appreciate some help with my problem below.</P><P> </P><P>I have a fact table that contains certificates (with unique certificate number) and their expiry dates. These can be renewed at a given time frame around the expiry date (eg. -/+ 3 months) ory may just expire on the expiry date (with no "renewal window"). I get this data ready from a sharepoint list.</P><P> </P><P>Some of these certificates are subject to surveys. So there is another fact table with the surveys and the two are releated with an ID column. Not all certificates have surveys and also the surveys may have the same logic as to their due date (Survey window).</P><P> </P><P>I want to present the certificate due dates (start window/expiry date/end window) in matrix visual (or other) and under them their corresponding surveys (if applicable) with their corresponding due dates.</P><P> </P><P>Ideally it would be a 3 column matrix where below the 'start window' header would be all the start window dates (where applicable, otherwise blank), below the 'due date' would be the the expiry(due) dates and below the 'end window'...you guessed it, the end window dates.</P><P> </P><P>I know that i have to create measures for each date and i should not use the actual columns from the two fact tables however i am not sure how to do it. I read about asymetrical data which is probably what i have and need to deal with but also i am not familiar with the concept that would apply here.</P><P> </P><P>Below is an inception of what i am trying to achieve and also below is a sample dataset.</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ioniaman_0-1620754469248.png" style="width: 400px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/512501i8809ED08E9D4E59C/image-size/medium?v=v2&px=400" role="button" title="Ioniaman_0-1620754469248.png" alt="Ioniaman_0-1620754469248.png" /></span></P><P> </P><P>There are also other dimensions which i have not included (these certificates belong to persons, so the person name may also be used instead of the certificate number and they also have names). The two tables are linked as per below</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ioniaman_1-1620754890430.png" style="width: 400px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/512505i96E1E6A0A7944432/image-size/medium?v=v2&px=400" role="button" title="Ioniaman_1-1620754890430.png" alt="Ioniaman_1-1620754890430.png" /></span></P><P> </P><P> </P><P> </P><P> </P><P>Certificates</P><P> </P><TABLE><TBODY><TR><TD>Id</TD><TD>Certificate Number</TD><TD>Certificate Type</TD><TD>Department</TD><TD>Certificate Renewal Start Window</TD><TD>Certificate Expiry Date</TD><TD>Certificate Renewal End Window</TD><TD>SubjectToSurvey</TD><TD>SubjectToInterim</TD></TR><TR><TD>45</TD><TD>1625-0037</TD><TD>Permanent</TD><TD>QMS</TD><TD>25-05-22</TD><TD>25-05-23</TD><TD>25-05-24</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>46</TD><TD>OMB. 1625-0037</TD><TD>Permanent</TD><TD>QMS</TD><TD> </TD><TD>18-02-24</TD><TD> </TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>47</TD><TD>LPR0/GKK/20191031170813-E1</TD><TD>Permanent</TD><TD>Technical</TD><TD>25-02-23</TD><TD>25-05-23</TD><TD>25-08-23</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>48</TD><TD>LPR0/GKK/20190913132217</TD><TD>Permanent</TD><TD>Technical</TD><TD>05-05-23</TD><TD>05-08-23</TD><TD>05-11-23</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>49</TD><TD>LPR0/GKK/20191031170813-E1/B</TD><TD>Record</TD><TD>Technical</TD><TD> </TD><TD>25-05-23</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>50</TD><TD>LPR0/GKK/201931847</TD><TD>Record</TD><TD>Technical</TD><TD> </TD><TD>05-08-23</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>51</TD><TD>DU-SVE-SO-00014070</TD><TD>Inspection</TD><TD>Technical</TD><TD> </TD><TD>01-06-21</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>52</TD><TD>52205110</TD><TD>Inspection</TD><TD>Technical</TD><TD> </TD><TD>25-09-21</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>53</TD><TD> BOTTOM 7</TD><TD>Other</TD><TD>Technical</TD><TD>05-05-23</TD><TD>05-08-23</TD><TD>05-11-23</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>54</TD><TD> BOTTOM 5</TD><TD>Other</TD><TD>Technical</TD><TD> </TD><TD>25-05-21</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>55</TD><TD>2722</TD><TD>Permanent</TD><TD>Technical</TD><TD>18-03-23</TD><TD>18-06-23</TD><TD>18-09-23</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>56</TD><TD>LPR0/VDO/20210310114547</TD><TD>Permanent</TD><TD>Technical</TD><TD>27-03-25</TD><TD>27-06-25</TD><TD>27-09-25</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>58</TD><TD>SR-06689</TD><TD>Inspection</TD><TD>Technical</TD><TD> </TD><TD>07-07-21</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>59</TD><TD>BOTTOM 3</TD><TD>Other</TD><TD>Technical</TD><TD> </TD><TD>26-07-23</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>61</TD><TD>LPR0/VDO/20201207122426</TD><TD>Permanent</TD><TD>Technical</TD><TD>24-05-22</TD><TD>24-08-22</TD><TD>24-11-22</TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>62</TD><TD>LPR0/VDO/20201207122426/B</TD><TD>Record</TD><TD>Technical</TD><TD> </TD><TD>24-08-22</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>66</TD><TD>1932</TD><TD>Record</TD><TD>Technical</TD><TD> </TD><TD>18-06-23</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>67</TD><TD>4318</TD><TD>Inspection</TD><TD>Technical</TD><TD> </TD><TD>11-05-23</TD><TD> </TD><TD>FALSE</TD><TD>TRUE</TD></TR><TR><TD>69</TD><TD>37</TD><TD>Permanent</TD><TD>QMS</TD><TD> </TD><TD>13-02-20</TD><TD> </TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>70</TD><TD>2842</TD><TD>Permanent</TD><TD>Technical</TD><TD> </TD><TD>18-06-23</TD><TD> </TD><TD>TRUE</TD><TD>TRUE</TD></TR><TR><TD>71</TD><TD>test</TD><TD>Maker</TD><TD> </TD><TD> </TD><TD>06-05-24</TD><TD> </TD><TD>FALSE</TD><TD><P>TRU</P></TD></TR></TBODY></TABLE><P> </P><P>Surveys</P><P> </P><TABLE><TBODY><TR><TD>Id</TD><TD>Survey Type</TD><TD>Survey Due Date</TD><TD>Survey Start Window Date</TD><TD>Survey End Window Date</TD><TD>MainCertRelatedID</TD><TD>Survey Status</TD></TR><TR><TD>50</TD><TD>Annual</TD><TD>25-05-19</TD><TD>25-02-19</TD><TD>25-08-19</TD><TD>44</TD><TD>Completed</TD></TR><TR><TD>51</TD><TD>Annual</TD><TD>27-06-21</TD><TD>27-03-21</TD><TD>27-09-21</TD><TD>56</TD><TD>Open</TD></TR><TR><TD>52</TD><TD>Annual</TD><TD>27-06-22</TD><TD>27-03-22</TD><TD>27-09-22</TD><TD>56</TD><TD>Open</TD></TR><TR><TD>54</TD><TD>Intermediate</TD><TD>27-12-22</TD><TD>27-03-22</TD><TD>27-09-23</TD><TD>56</TD><TD>Open</TD></TR><TR><TD>56</TD><TD>Annual</TD><TD>27-06-24</TD><TD>27-03-24</TD><TD>27-09-24</TD><TD>56</TD><TD>Open</TD></TR><TR><TD>57</TD><TD>Annual</TD><TD>30-07-21</TD><TD>30-07-21</TD><TD>30-07-21</TD><TD>46</TD><TD>Open</TD></TR><TR><TD>58</TD><TD>Annual</TD><TD>25-05-20</TD><TD>25-02-20</TD><TD>25-08-20</TD><TD>47</TD><TD>Completed</TD></TR><TR><TD>59</TD><TD>Annual</TD><TD>05-08-19</TD><TD>05-05-19</TD><TD>05-11-19</TD><TD>43</TD><TD>Completed</TD></TR><TR><TD>60</TD><TD>Annual</TD><TD>05-08-20</TD><TD>05-05-20</TD><TD>05-11-20</TD><TD>43</TD><TD>Completed</TD></TR><TR><TD>61</TD><TD>Intermediate</TD><TD>05-02-21</TD><TD>05-05-20</TD><TD>05-11-21</TD><TD>43</TD><TD>Open</TD></TR><TR><TD>62</TD><TD>Annual</TD><TD>05-08-22</TD><TD>05-05-22</TD><TD>05-11-22</TD><TD>43</TD><TD>Open</TD></TR><TR><TD>63</TD><TD>Annual</TD><TD>05-08-19</TD><TD>05-05-19</TD><TD>05-11-19</TD><TD>48</TD><TD>Completed</TD></TR><TR><TD>65</TD><TD>Annual</TD><TD>05-08-20</TD><TD>05-05-20</TD><TD>05-11-20</TD><TD>48</TD><TD>Completed</TD></TR><TR><TD>66</TD><TD>Intermediate</TD><TD>05-02-22</TD><TD>05-05-21</TD><TD>05-11-22</TD><TD>48</TD><TD>Open</TD></TR><TR><TD>67</TD><TD>Annual</TD><TD>05-08-22</TD><TD>05-05-21</TD><TD>05-11-22</TD><TD>48</TD><TD>Open</TD></TR><TR><TD>70</TD><TD>Annual</TD><TD>25-05-20</TD><TD>25-02-20</TD><TD>25-08-20</TD><TD>44</TD><TD>Completed</TD></TR><TR><TD>73</TD><TD>Intermediate</TD><TD>25-11-20</TD><TD>25-02-20</TD><TD>25-08-21</TD><TD>44</TD><TD>Completed</TD></TR><TR><TD>76</TD><TD>Annual</TD><TD>25-05-21</TD><TD>25-02-21</TD><TD>25-08-21</TD><TD>44</TD><TD>Open</TD></TR><TR><TD>77</TD><TD>Annual</TD><TD>25-05-22</TD><TD>25-02-22</TD><TD>25-08-22</TD><TD>44</TD><TD>Open</TD></TR><TR><TD>78</TD><TD>Annual</TD><TD>21-12-20</TD><TD>21-12-20</TD><TD>21-12-20</TD><TD>45</TD><TD>Open</TD></TR><TR><TD>79</TD><TD>Annual</TD><TD>25-05-21</TD><TD>25-02-21</TD><TD>25-08-21</TD><TD>47</TD><TD>Open</TD></TR><TR><TD>81</TD><TD>Intermediate</TD><TD>25-11-20</TD><TD>25-02-20</TD><TD>25-08-21</TD><TD>47</TD><TD>Open</TD></TR><TR><TD>82</TD><TD>Annual</TD><TD>25-05-22</TD><TD>25-02-22</TD><TD>25-08-22</TD><TD>47</TD><TD>Open</TD></TR><TR><TD>83</TD><TD>Annual</TD><TD>27-06-23</TD><TD>27-03-23</TD><TD>27-09-23</TD><TD>56</TD><TD>Open</TD></TR><TR><TD>84</TD><TD>Annual</TD><TD>24-08-18</TD><TD>24-05-18</TD><TD>24-11-18</TD><TD>61</TD><TD>Completed</TD></TR><TR><TD>85</TD><TD>Annual</TD><TD>24-08-19</TD><TD>24-05-19</TD><TD>24-11-19</TD><TD>61</TD><TD>Completed</TD></TR><TR><TD>86</TD><TD>Intermediate</TD><TD>24-08-20</TD><TD>24-11-19</TD><TD>24-05-21</TD><TD>61</TD><TD>Completed</TD></TR><TR><TD>87</TD><TD>Annual</TD><TD>24-08-20</TD><TD>24-05-20</TD><TD>24-11-20</TD><TD>61</TD><TD>Completed</TD></TR><TR><TD>88</TD><TD>Annual</TD><TD>24-08-21</TD><TD>24-05-21</TD><TD>24-11-21</TD><TD>61</TD><TD>Open</TD></TR><TR><TD>89</TD><TD>Annual</TD><TD>05-08-20</TD><TD>05-05-20</TD><TD>05-11-20</TD><TD>43</TD><TD>Completed</TD></TR><TR><TD>90</TD><TD>Annual</TD><TD>05-08-21</TD><TD>05-05-22</TD><TD>05-11-22</TD><TD>48</TD><TD>Open</TD></TR><TR><TD>91</TD><TD>Annual</TD><TD>18-06-19</TD><TD>18-03-19</TD><TD>18-09-19</TD><TD>55</TD><TD>Completed</TD></TR><TR><TD>92</TD><TD>Annual</TD><TD>18-06-20</TD><TD>18-03-20</TD><TD>18-09-20</TD><TD>55</TD><TD>Completed</TD></TR></TBODY></TABLE><P> </P><P>One thing i managed to do, is to have two matrix tables in the same report page and once you click on a certificate number, then it will filter the survey matrix and present the appropriate survey dates, but i don't really like this solution.</P><P> </P><P>Pleased to hear anyone's thoughts on this</P>Wed, 12 May 2021 11:29:27 GMThttps://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1836807#M711184Ioniaman2021-05-12T11:29:27ZRe: Matrix table with dates for two related tables
https://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1838426#M711631
<P><LI-USER uid="301433"></LI-USER> </P><P> </P><P>To my mind (and it can be easily seen in the picture as well), a measure such as "Earliest Certificate Renewal Start Window" does not depend on surveys. The other 2 measures you have in the first table visual do not depend on surveys, either. So, I don't quite understand where the problem is.</P><P> </P><P>You just write </P><P> </P><LI-CODE lang="csharp">MIN( YourTable[Certificate Renewal Start Window] )</LI-CODE><P> </P><P>be done with it. The other measures are equally as simple.</P><P> </P><P>I don't get this:</P><P> </P><P><EM>I know that i have to create measures for each date and i should not use the actual columns from the two fact tables</EM></P><P> </P><P><SPAN>Why should you not use the columns from the fact tables? In fact, you may use columns from fact tables in DAX formulas and many a time you even should. On the other hand, you <STRONG>should never </STRONG>use them in the UI. Fact tables should almost always be hidden from users' view.</SPAN></P>Wed, 12 May 2021 11:32:01 GMThttps://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1838426#M711631daxer2021-05-12T11:32:01ZRe: Matrix table with dates for two related tables
https://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1838870#M711756
<P>Thank you for your input. Perhaps i did not explain it correctly.</P><P>Since both certificates and surveys follow the "start window/due date/end window" pattern i wanted to create 3 such columns and below those, the corresponding dates would appear (where applicable).</P><P>The Rows would be</P><P> Certificate number</P><P> Survey</P><P> </P><P>and their corresponding dates would appear under the columns (or blank if n/a)</P><P> </P><P>So, i created a MIN measure as per your advise for all 6 dates and now i need 3 measures i guess (start/due/end) that would display the appropriate date measure of the 6 in the corresponding row. I Think that maybe a SWITCH measure is appropriate? Anyone to assist?</P><P> </P>Thu, 13 May 2021 17:18:13 GMThttps://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1838870#M711756Ioniaman2021-05-13T17:18:13ZRe: Matrix table with dates for two related tables
https://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1839290#M711865
<P>Yes, you need 6 measures: 3 for surveys and 3 for certificates. But whether just taking MIN and MAX of the relevant columns is enough depends on the requirements. If you've got a set of certificates in scope (meaning in the current context), then the MIN/MAX functions will return the min and max across these certificates. Same goes for surveys. Whether such a measure makes sense or not is a question of interpretation and business requirements. If, for instance, you have to have only one cert in scope to show such a measure, then you have to guard the calculation with something like</P><P> </P><LI-CODE lang="csharp">IF( HASOVEVALUE( T[CertificateID] ),
[Your Measure]
)</LI-CODE><P>Again, same goes for surveys. It's up to you to decide what meaning you want to attach to the numbers and if you need to put in guard clauses.</P>Wed, 12 May 2021 18:37:16 GMThttps://community.powerbi.com/t5/Desktop/Matrix-table-with-dates-for-two-related-tables/m-p/1839290#M711865daxer2021-05-12T18:37:16Z